Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 1.8.7 does not have options hash #156

Closed
wants to merge 1 commit into from

Conversation

edestecd
Copy link

@edestecd edestecd commented May 5, 2016

Ruby 1.8.7 Net::HTTP.start does not accept a hash of options.
This change allows it to work in both 1.8.7 and newer rubies.

@bastelfreak
Copy link
Member

Hi,

we dropped ruby1.8.7 support. THis is a very very old and buggy and unsupported version. Please upgrade you ruby or use a older version of the module. If you need help for upgrading your puppet env please join our IRC channel #voxpupuli on freenode.

@edestecd
Copy link
Author

edestecd commented May 5, 2016

Puppet 3.x on RedHat 6 installed from puppetlabs rpms still uses Ruby 1.8.7.
If your module claims to support Pupept 3.x and RedHat 6, then it is advisable to support 1.8.7.

This is the only correction I have needed to make. Why not support it, if possible?

@bastelfreak
Copy link
Member

bastelfreak commented May 5, 2016

We still support Puppet3.X, but not Ruby1.8.7. As I said this is a totally unpatched Version, it is slow, has open issues and is unmaintained. We had a huge discussion a while back about dropping it. If your OS vendor doesn't ship a decent Ruby version you can switch to puppetlabs AIO packages or build them on your own.

@edestecd
Copy link
Author

edestecd commented May 5, 2016

Puppetlabs AIO is puppet > 4, correct? So there is no option for a newer ruby on Puppet 3.x, other than compiling it yourself.

@edestecd
Copy link
Author

edestecd commented May 5, 2016

What version of this module supports 1.8.7?

@bastelfreak
Copy link
Member

This is the case for Centos6, yes. RedHat is unable to ship a new version for $reasons :(
But Puppet 3 itself supports newer version, Centos7/Debian8 for example ship ruby2.0/2.1 which works well for Puppet. Archlinux runs Puppet3 on Ruby2.3.


I don't have in my mind which release still supports 1.8 :( I could be 0.4.8

@nanliu
Copy link
Contributor

nanliu commented May 6, 2016

I'm not opposed to this patch for backwards compatibility, besides the default provider is curl on linux.

@rnelson0
Copy link
Member

rnelson0 commented May 6, 2016

It's important to note that we can make changes that work with Ruby 1.8.7, but there will be no testing with 1.8.7 so there could be regressions in the future.

Re: EL6 and puppet 3, you can use the SCL repo or rvm/rbenv to get a newer version of Ruby for use with puppet.

@bastelfreak is the ruby_dep issue resolved in modulesync? If so, we should sync and then have this rebased.

@edestecd
Copy link
Author

edestecd commented May 6, 2016

@nanliu I had the same thought about curl being the default on linux. I wondered why this code was being executed... Does that code get used to fetch the checksum or something?

I have something like this:

archives:
  /tmp/foo.txt:
    source: "https://example.edu/%{::environment}/Artifact/foo.txt"
    checksum_url: "https://example.edu/%{::environment}/Artifact/foo.txt.sha1"
    checksum_type: sha1

@edestecd
Copy link
Author

edestecd commented May 6, 2016

@rnelson0 yes Foreman uses the scl repos I believe to get ruby 1.9.3. I may look into that...
But for now I need something to work on my boxes. I understand that you do not test against 1.8.7 and support will be up to me until I can switch to a newer ruby...

@bastelfreak
Copy link
Member

New modulesync is happening in #157

@bastelfreak
Copy link
Member

@rnelson0 the gem issue is fixed now, I did a modulesync.

@rnelson0
Copy link
Member

rnelson0 commented May 6, 2016

@edestecd can you rebase this and push? CI should pass this time.

@edestecd
Copy link
Author

edestecd commented May 6, 2016

@rnelson0 the new commits convert everything to ruby 1.9 hash syntax, which makes my change moot, since I am trying to make 1.8.7 work.

@rnelson0
Copy link
Member

rnelson0 commented May 6, 2016

@edestecd I was afraid of that. The use of rubocop with a 1.9 compat level can be pretty strict about hash syntax and other changes, but not syncing this module with other voxpupuli modules is not a good position either. I'm sorry!

Is there any way forward that would permit compatibility with 1.8.7 without violating the modulesync settings? Would one or two rubocop disable comments resolve this or would it require dozens and defeat the point of rubocop?

@edestecd
Copy link
Author

edestecd commented May 6, 2016

This is the culprit:
ccb0a26#diff-11a0d7906801d9dea0eccb85667ad811L45

@rnelson0
Copy link
Member

rnelson0 commented May 6, 2016 via email

@jyaworski
Copy link
Member

@rnelson0 we would have to disable the hash_syntax cop again. I'm not against it, but I think we should leave it on for the spec tests. Maybe just leave it off for lib and templates.

@bastelfreak
Copy link
Member

I'm against disabling the cop. There are enough solutions to get a newer ruby version. 1.8.3 is EOL since a long long time and we should git rid of it as soon as possible.

@telegrapher
Copy link

Hello guys!
Thanks for your work!! This is a great module!!

I've been bit by this issue. I've had to upgrade puppet-archive due other modules' dependencies and then all the CentOS 6 machines stopped working. This patch worked fine for me.

A Ruby upgrade will not be possible in many environments, a clear warning for RHEL/CentOS 6 users upgrading to >0.4.8 could be really useful!!

@jyaworski
Copy link
Member

This patch works, with no change in functionality. I'd be fine with accepting it. @edestecd can you rebase?

@edestecd
Copy link
Author

@jyaworski have you fixed rubocop to accept the old ruby 1.8.7 hash syntax?
Unless that is reverted 1.8.7 will not work and my pr is moot...

@jyaworski
Copy link
Member

@edestecd oh. You meant outside of the scope of this PR. No, we have not yet changed rubocop and we are unlikely to do so. I agree that 1.8.7 is still around (curse you RHEL6) and it's annoying to work around it, but we are discussing here in voxpupuli/plumbing#36 about using softwarecollections on RHEL6 to get around this annoyance. Please add input there.

@edestecd
Copy link
Author

I'm up for learning how to make the puppetlabs rpms for puppet 3.x use the softwarecollections.
I have not figured it out yet...

Hopefully we can migrate to puppet 4 soon. I'm waiting on full Foreman support, which should be fairly soon....

@jyaworski
Copy link
Member

@edestecd Foreman has very recently (last week-ish) supported puppet 4 in the nightlies. Next release.

I think we can append scl ruby1.9.3 enable to the puppet service file. @bastelfreak has some experience in this, but with Arch I think.

@bastelfreak
Copy link
Member

On arch it is a bit different, we currently ship ruby2.3 as the default MRI version, so we don't have to deal with SCL. Building puppet3 on ruby2.1 or older worked out of the box, for ruby2.2 and 2.3 we need a oneline patch.

@bastelfreak
Copy link
Member

@edestecd how should we proceed here? Are you going to upgrade your puppet/ruby version and this can be closed or did I understand you wrong?

@edestecd
Copy link
Author

edestecd commented Jun 6, 2016

@bastelfreak I think we will upgrade to puppet 4 when the next version of Foreman comes out.
Until then we can use my forked version...

@edestecd edestecd closed this Jun 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants