Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3796

Puppet 3.7.3 is not supported on Ruby 2.2

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.7.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:

      Description

      Puppet does not currently run on the latest stable Ruby 2.2.0 because Syck is no longer available.

      ==> vagrant.rails.com: /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet/defaults.rb:465: warning: duplicated key at line 466 ignored: :queue_type
      ==> vagrant.rails.com: /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>': uninitialized constant Syck (NameError)
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:197:in `<module:YAML>'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:132:in `<top (required)>'
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet/vendor/require_vendored.rb:4:in `<top (required)>'
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet/vendor.rb:40:in `require_libs'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet/vendor.rb:53:in `load_vendored'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet.rb:172:in `<module:Puppet>'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet.rb:29:in `<top (required)>'
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/lib/puppet/util/command_line.rb:12:in `<top (required)>'
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/gems/puppet-3.7.3/bin/puppet:7:in `<top (required)>'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/bin/puppet:23:in `load'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/bin/puppet:23:in `<main>'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
      ==> vagrant.rails.com: 	from /usr/local/rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
      

        Attachments

          Issue Links

            Activity

            Hide
            anatolik Anatol Pomozov added a comment -

            Do you have ETA for a bugfix?

            Ruby 2.2 is stable now and recommended for use. The 2.2 incompatibility should be fixed as soon as possible.

            Show
            anatolik Anatol Pomozov added a comment - Do you have ETA for a bugfix? Ruby 2.2 is stable now and recommended for use. The 2.2 incompatibility should be fixed as soon as possible.
            Hide
            anatolik Anatol Pomozov added a comment -

            I believe this safe_yaml patch fixes the issue https://github.com/dtao/safe_yaml/commit/e281053e80fa3b3abd9a63d16d2492e24f075ac4

            i.e. bumping safe_yaml to 1.0.4 should fix the issue

            Show
            anatolik Anatol Pomozov added a comment - I believe this safe_yaml patch fixes the issue https://github.com/dtao/safe_yaml/commit/e281053e80fa3b3abd9a63d16d2492e24f075ac4 i.e. bumping safe_yaml to 1.0.4 should fix the issue
            Hide
            kylo Kylo Ginsberg added a comment - - edited

            Note that in puppet 4, safe_yaml is removed so this failure mode is moot. Also, I added a PR to enable spec runs against ruby 2.2 against puppet/master.

            Show
            kylo Kylo Ginsberg added a comment - - edited Note that in puppet 4, safe_yaml is removed so this failure mode is moot. Also, I added a PR to enable spec runs against ruby 2.2 against puppet/master.
            Hide
            eric.sorenson Eric Sorenson added a comment -

            Untargeting from 3.7.4 release since that's going out the door next week

            Anatol Pomozov any chance you could work up a patch and PR so we can run this through Travis? That would help a lot.

            Show
            eric.sorenson Eric Sorenson added a comment - Untargeting from 3.7.4 release since that's going out the door next week Anatol Pomozov any chance you could work up a patch and PR so we can run this through Travis? That would help a lot.
            Hide
            anatolik Anatol Pomozov added a comment -

            In Linux Arch we use following change https://github.com/dtao/safe_yaml/commit/e281053e80fa3b3abd9a63d16d2492e24f075ac4

            Another way to fix the problem is to bump the safe_yaml gem.

            Show
            anatolik Anatol Pomozov added a comment - In Linux Arch we use following change https://github.com/dtao/safe_yaml/commit/e281053e80fa3b3abd9a63d16d2492e24f075ac4 Another way to fix the problem is to bump the safe_yaml gem.
            Hide
            ba Barry Allard added a comment - - edited

            This Blocker bug has sat Unresolved for over two weeks.

            Syck goes away in 4.x, but it's required for 3.7.x today, in the real world, not "in the next release" nonsense.

            gem install syck and insert require 'syck' in puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb before line 42

            --- lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb  2015-01-22 18:30:50.750823101 -0800
            +++ lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb  2015-01-22 18:31:01.815114582 -0800
            @@ -39,5 +39,6 @@
             if defined?(YAML::Syck::Node)
               YAML::Syck.module_eval monkeypatch
             else
            +  require 'syck' if RUBY_VERSION >= '2.2'
               Syck.module_eval monkeypatch
             end
            

            Show
            ba Barry Allard added a comment - - edited This Blocker bug has sat Unresolved for over two weeks. Syck goes away in 4.x, but it's required for 3.7.x today, in the real world, not "in the next release" nonsense. gem install syck and insert require 'syck' in puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb before line 42 --- lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb 2015-01-22 18:30:50.750823101 -0800 +++ lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb 2015-01-22 18:31:01.815114582 -0800 @@ -39,5 +39,6 @@ if defined?(YAML::Syck::Node) YAML::Syck.module_eval monkeypatch else + require 'syck' if RUBY_VERSION >= '2.2' Syck.module_eval monkeypatch end
            Hide
            ba Barry Allard added a comment -

            FYI warning: duplicated key at line 466 fix in PUP-3902

            Show
            ba Barry Allard added a comment - FYI warning: duplicated key at line 466 fix in PUP-3902
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            Eric Sorenson When do you want a fix for this? Fixing it for 3.7.5 requires that we set up Ruby 2.2 in our test pipeline for 3x, we currently only run Ruby 2.1. Quick fix is to only add it on travis ci (at least better than nothing).

            Show
            henrik.lindberg Henrik Lindberg added a comment - Eric Sorenson When do you want a fix for this? Fixing it for 3.7.5 requires that we set up Ruby 2.2 in our test pipeline for 3x, we currently only run Ruby 2.1. Quick fix is to only add it on travis ci (at least better than nothing).
            Hide
            eric.sorenson Eric Sorenson added a comment -

            Adding on Travis is fine (isn't that the PR kylo referenced above?), 3.7.5 is fine.

            What OS + installation method are you folks affected by this problem running? Barry Allard Anatol Pomozov

            Barry Allard the emotional tone in your comment is unhelpful.

            Show
            eric.sorenson Eric Sorenson added a comment - Adding on Travis is fine (isn't that the PR kylo referenced above?), 3.7.5 is fine. What OS + installation method are you folks affected by this problem running? Barry Allard Anatol Pomozov Barry Allard the emotional tone in your comment is unhelpful.
            Hide
            anatolik Anatol Pomozov added a comment -

            We see this issue on Linux Arch that has ruby2.2 as a default ruby version.

            You'll be able to reproduce this issue by installing ruby2.2 (e.g. by using rvm).

            warning: duplicated key at line 466

            we see this warning as well - there is duplicated key that is already removed in trunk.

            Show
            anatolik Anatol Pomozov added a comment - We see this issue on Linux Arch that has ruby2.2 as a default ruby version. You'll be able to reproduce this issue by installing ruby2.2 (e.g. by using rvm). warning: duplicated key at line 466 we see this warning as well - there is duplicated key that is already removed in trunk.
            Hide
            ba Barry Allard added a comment -

            Eric Sorenson Most unique public vendor feedback. You're welcome for fixing an idle blocker issue. Would Puppet Labs prefer bugs to atropy, go unreported or fewer enterprise licenses?

            Show
            ba Barry Allard added a comment - Eric Sorenson Most unique public vendor feedback. You're welcome for fixing an idle blocker issue. Would Puppet Labs prefer bugs to atropy, go unreported or fewer enterprise licenses?
            Hide
            kylo Kylo Ginsberg added a comment -

            I put up a PR against stable cherry-picking the 2.2 support from puppet/master and fixing two minor 3.7.x-specific issues with ruby 2.2.

            Show
            kylo Kylo Ginsberg added a comment - I put up a PR against stable cherry-picking the 2.2 support from puppet/master and fixing two minor 3.7.x-specific issues with ruby 2.2.
            Hide
            henrik.lindberg Henrik Lindberg added a comment -

            Excellent Kylo Ginsberg - update travis.ci at the same time to include Ruby 2.2 in the matrix to help us stay honest ?

            Show
            henrik.lindberg Henrik Lindberg added a comment - Excellent Kylo Ginsberg - update travis.ci at the same time to include Ruby 2.2 in the matrix to help us stay honest ?
            Hide
            kylo Kylo Ginsberg added a comment -

            Henrik Lindberg yep that's in the PR.

            Show
            kylo Kylo Ginsberg added a comment - Henrik Lindberg yep that's in the PR.
            Hide
            chuck Charlie Sharpsteen added a comment -

            Kylo Ginsberg Looks like the PR was closed without a merge. Are we planning to back support for Ruby 2.2.0 to 3.7.x, or leave it as a Puppet 4 only thing?

            Show
            chuck Charlie Sharpsteen added a comment - Kylo Ginsberg Looks like the PR was closed without a merge. Are we planning to back support for Ruby 2.2.0 to 3.7.x, or leave it as a Puppet 4 only thing?
            Hide
            kylo Kylo Ginsberg added a comment -

            Thanks for the reminder Charlie Sharpsteen. We're not planning to backport 2.2 fixes to 3.x. It turns out that PR was necessary but not sufficient b/c the 3.x code base has more dependencies with 2.2 entanglements than does the 4.x code base.

            I'll close this for now, although if someone puts up a PR for sorting out all 2.2 issues in the 3.x branch, we will of course review that. The trick will be making 2.2 work with the various dependencies that the 3.x branch has on older features/gems that may not themselves have 2.2 support.

            Show
            kylo Kylo Ginsberg added a comment - Thanks for the reminder Charlie Sharpsteen . We're not planning to backport 2.2 fixes to 3.x. It turns out that PR was necessary but not sufficient b/c the 3.x code base has more dependencies with 2.2 entanglements than does the 4.x code base. I'll close this for now, although if someone puts up a PR for sorting out all 2.2 issues in the 3.x branch, we will of course review that. The trick will be making 2.2 work with the various dependencies that the 3.x branch has on older features/gems that may not themselves have 2.2 support.
            Hide
            lolred Carl Patenaude-Poulin added a comment - - edited

            FYI - Debian and Ubuntu do not ship 4.x in the default repositories, but recent releases have the default version of ruby at >= 2.2. It might be worth either fixing this bug or publishing .deb packages for 4.x.

            Show
            lolred Carl Patenaude-Poulin added a comment - - edited FYI - Debian and Ubuntu do not ship 4.x in the default repositories, but recent releases have the default version of ruby at >= 2.2. It might be worth either fixing this bug or publishing .deb packages for 4.x.
            Hide
            Ajedi32 Ajedi32 added a comment - - edited

            FYI, as hinted at by Anatol Pomozov, I was able to work around this bug by putting

            gem 'safe_yaml', '~> 1.0.4'
            

            in my Gemfile.

            Show
            Ajedi32 Ajedi32 added a comment - - edited FYI, as hinted at by Anatol Pomozov , I was able to work around this bug by putting gem 'safe_yaml' , '~> 1.0.4' in my Gemfile.

              People

              • Assignee:
                kylo Kylo Ginsberg
                Reporter:
                salimane Salimane Adjao Moustapha
              • Votes:
                6 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support