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

incorrect error message "You need rubygems to use Hiera"

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Won't Fix
    • PUP 3.4.2
    • None
    • None
    • Red Hat Enterprise Linux 6.5, Puppet Labs package for puppet 3.4.2 and puppet-server 3.4.2, along with dependencies from Puppet Labs' yum repo.

    • Major

    Description

      I've attempted to follow the documentation here:

      http://docs.puppetlabs.com/guides/upgrading.html

      to test promoting one of our existing puppet 2.7.14 client systems to be a (test) 3.4.2 puppet master. I've also tried not promoting the client, and instead just installing 3.4.2 from scratch. Both attempted installation methods result in the same error.

      I start the server using the arguments recommended in the upgrade document:

      $ sudo puppet master --no-daemonize --verbose
      Notice: Starting Puppet master version 3.4.2
      

      When I connect with a client system, the client gets the message:

      Error: Could not retrieve catalog from remote server: Error 400 on SERVER: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on node rh6client.example.com
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run
      

      Meanwhile, the server console has output:

      Info: access[^/catalog/([^/]+)$]: allowing 'method' find
      Info: access[^/catalog/([^/]+)$]: allowing $1 access
      Info: access[^/node/([^/]+)$]: allowing 'method' find
      Info: access[^/node/([^/]+)$]: allowing $1 access
      Info: access[/certificate_revocation_list/ca]: allowing 'method' find
      Info: access[/certificate_revocation_list/ca]: allowing * access
      Info: access[^/report/([^/]+)$]: allowing 'method' save
      Info: access[^/report/([^/]+)$]: allowing $1 access
      Info: access[^/file_(metadata|content)/secure/]: adding authentication yes
      Info: access[^/file_(metadata|content)/secure/]: allowing IP 10.1.1.0/24 access
      Info: access[/file]: allowing * access
      Info: access[/facts]: adding authentication any
      Info: access[/facts]: allowing 'method' find
      Info: access[/facts]: allowing 'method' search
      Info: access[/facts]: allowing config-tmp.example.com access
      Info: access[/facts]: allowing config.example.com access
      Info: access[/certificate/ca]: adding authentication any
      Info: access[/certificate/ca]: allowing 'method' find
      Info: access[/certificate/ca]: allowing * access
      Info: access[/certificate/]: adding authentication any
      Info: access[/certificate/]: allowing 'method' find
      Info: access[/certificate/]: allowing * access
      Info: access[/certificate_request]: adding authentication any
      Info: access[/certificate_request]: allowing 'method' find
      Info: access[/certificate_request]: allowing 'method' save
      Info: access[/certificate_request]: allowing * access
      Info: access[/]: adding authentication any
      Info: Inserting default '/status' (auth true) ACL
      Info: Caching node for rh6client.example.com
      Info: Caching node for rh6client.example.com
      Warning: Puppet.features.rubygems? is deprecated. Require rubygems in your application's entry point if you need it.
         (at /usr/lib/ruby/site_ruby/1.8/puppet/util/feature.rb:17:in `add')
      Error: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on node rh6client.example.com
      Error: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on node rh6client.example.com
      Error: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on node rh6client.example.com
      

      The manifest in question has this near line 243:

      @user { 'ncsprime':
          home       => '/var/netflow/ncsprime',
          gid        => 'ncsprime',
          comment    => 'Cisco NCS Prime backup file owner',
          membership => inclusive,
          uid        => '709844',
          password   => hiera('ncsprime_password', '!!'),
      }
      

      Note that the server DOES have rubygems installed; it was pulled in as part of the dependencies for the Puppet Labs puppet 3.4.2 RPM, along with Red Hat's ruby, ruby-irb, Puppet Labs's facter and several ruby dependencies from the Puppet Labs dependencies repo.

      No part of puppet was installed "by hand" or from gems – everything I installed came from packages.

      $ rpm -q --queryformat '%{name}-%{version}-%{release}.%{arch}:%{vendor}\n' puppet puppet-server hiera facter ruby ruby-irb rubygems
      puppet-3.4.2-1.el6.noarch:Puppet Labs
      puppet-server-3.4.2-1.el6.noarch:Puppet Labs
      hiera-1.3.0-1.el6.noarch:Puppet Labs
      facter-1.7.4-1.el6.x86_64:Puppet Labs
      ruby-1.8.7.352-13.el6.x86_64:Red Hat, Inc.
      ruby-irb-1.8.7.352-13.el6.x86_64:Red Hat, Inc.
      rubygems-1.3.7-5.el6.noarch:Red Hat, Inc.
      

      I've been trying to get around this error for several days, without any luck. Whatever the problem actually is, it's not that rubygems is missing.

      Attachments

        Activity

          People

            eric.sorenson Eric Sorenson
            solstice Tim Mooney
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support