You are not logged in.

#1 2010-04-08 23:39:52

windowbreaker
Member
Registered: 2008-06-18
Posts: 46

Ruby 1.9.1 breaking Puppet package???

So I'm learning puppet and thought I'd play w/it on my Arch vm. I installed Puppet from AUR using Yaourt, but I think it is broken. 
When attempting to start Puppet I get a few warnings (see below) but it starts:

/etc/rc.d/puppet start

dnsdomainname: Unknown host
Could not autoload file: constant Puppet::Type::File not defined

To verify it's running I do:

pgrep -lf puppet
5888 /usr/bin/ruby /usr/sbin/puppetd

Now, when I try to start Puppet Master it produces many more errors and then fails (ie: doesn't start)

/etc/rc.d/puppetmaster start

dnsdomainname: Unknown host
Could not autoload file: constant Puppet::Type::File not defined
/usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:741:in `initialize': Permission denied - /var/lib/puppet/ssl/ca/ca_key.pem (Errno::EACCES)
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:741:in `open'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:741:in `block (2 levels) in writesub'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/util.rb:145:in `withumask'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:740:in `block in writesub'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/suidmanager.rb:35:in `asuser'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:731:in `writesub'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:717:in `write'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/indirector/ssl_file.rb:156:in `write'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/indirector/ssl_file.rb:98:in `save'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/indirector/key/file.rb:34:in `save'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/indirector/indirection.rb:255:in `save'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/indirector.rb:65:in `save'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/host.rb:129:in `generate_key'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/host.rb:160:in `certificate'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:241:in `setup'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:154:in `initialize'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:31:in `new'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:31:in `block in singletonclass'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/cacher.rb:106:in `cached_value'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/cacher.rb:46:in `block in cached_attr'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:45:in `instance'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/application/puppetmasterd.rb:163:in `block (2 levels) in <top (required)>'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/application.rb:216:in `block in run'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/application.rb:306:in `exit_on_fail'
    from /usr/lib/ruby/site_ruby/1.9.1/puppet/application.rb:216:in `run'
    from /usr/sbin/puppetmasterd:66:in `<main>'

Googling around I found a related bug from last year at the following URL:
http://projects.puppetlabs.com/issues/2191

That bug appears to have to do with Ruby 1.9.1 (what I currently have, and what is required by the AUR pkg) breaking Puppet.  The AUR pkg was last updated last month, so it must work with Ruby 1.9.1 I assume - although there are no comments on the AUR pkg page.

I personally use Perl so know nothing about Ruby or what any of these warnings/errors mean.  I could use a little guidance/advice/suggestions here as to how to resolve or troubleshoot this issue.


Also, my system is fully up to date as of today,

Offline

#2 2010-05-04 13:14:22

fmjrey
Member
Registered: 2009-08-19
Posts: 13

Re: Ruby 1.9.1 breaking Puppet package???

I'm also having a similar issue, just installed puppet:

$ sudo puppetmasterd --mkusers
Password:                                                                                
Could not autoload file: constant Puppet::Type::File not defined                         
/usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:741:in `initialize': No such file or directory - /etc/puppet/ssl/ca/private/ca.pass (Errno::ENOENT)
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:741:in `open'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:741:in `block (2 levels) in writesub'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/util.rb:145:in `withumask'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:740:in `block in writesub'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/suidmanager.rb:35:in `asuser'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:731:in `writesub'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/settings.rb:717:in `write'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:171:in `generate_password'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:130:in `generate_ca_certificate'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:241:in `setup'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:154:in `initialize'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:31:in `new'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:31:in `block in singletonclass'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/cacher.rb:106:in `cached_value'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/util/cacher.rb:46:in `block in cached_attr'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/ssl/certificate_authority.rb:45:in `instance'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/application/puppetmasterd.rb:163:in `block (2 levels) in <top (required)>'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/application.rb:216:in `block in run'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/application.rb:306:in `exit_on_fail'
        from /usr/lib/ruby/site_ruby/1.9.1/puppet/application.rb:216:in `run'
        from /usr/sbin/puppetmasterd:66:in `<main>'
[francois@mocha puppet]$ ruby --version
ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]

Anyone any idea?

Offline

#3 2010-06-29 03:37:53

nrub
Member
Registered: 2010-06-29
Posts: 1

Re: Ruby 1.9.1 breaking Puppet package???

I found that running the following commands got me to a point where puppetmasterd creates a pid in /var/run/puppet/ though doesn't stay alive.

mkdir /etc/puppet/ssl/ca/private
chown puppet:puppet /etc/puppet/ssl/ca/private
mkdir /etc/puppet/ssl/ca/signed
chown puppet:puppet /etc/puppet/ssl/ca/signed
mkdir /etc/puppet/ssl/ca/requests
chown puppet:puppet /etc/puppet/ssl/ca/requests
mkdir /etc/puppet/ssl/certificate_requests
chown puppet:puppet /etc/puppet/ssl/certificate_requests

chown puppet:puppet /var/run/puppet/

I'm still receiving the following errors when trying to run puppetmasterd

Could not autoload file: constant Puppet::Type::File not defined
Could not autoload status: undefined method `add_method' for nil:NilClass
Could not autoload fileserver: undefined method `add_method' for nil:NilClass
Could not autoload master: undefined method `add_method' for nil:NilClass
Could not autoload report: undefined method `add_method' for nil:NilClass
Could not autoload filebucket: undefined method `add_method' for nil:NilClass
Could not autoload ca: undefined method `add_method' for nil:NilClass

I'm still working on this myself. Hopefully this will help someone out. Will be back in touch if I find the answer or someone is able to chime in.

Offline

#4 2010-07-07 00:44:51

jamtur01
Member
Registered: 2010-07-07
Posts: 1

Re: Ruby 1.9.1 breaking Puppet package???

Puppet is not yet supported on Ruby 1.9.x.  Support is planned for a forthcoming feature release.  If you wish to use Puppet you will currently need to use Ruby 1.8.x.

Regards

James Turnbull
Puppet Labs

Offline

#5 2010-09-07 22:13:55

miah
Member
From: US
Registered: 2008-12-30
Posts: 4

Re: Ruby 1.9.1 breaking Puppet package???

I'll update the AUR package stating that Ruby 1.9 breaks Puppet. We were fine until Archlinux moved to Ruby 1.9, I'm not sure why Chris marked Ruby 1.9 as the requirement in the PKGBUILD. I'm not sure which route to take with "fixing" this in AUR. Its possible that we can make this package depend on a AUR provided version of Ruby 1.8, but that doesn't seem very optimal to me.

Offline

Board footer

Powered by FluxBB