tickets | 1 Sep 07:58 2010

[Puppet - Bug #4409] (Needs more information) puppetmasterd does not find custom types for environment

Issue #4409 has been updated by Markus Roberts.
  • Status changed from Investigating to Needs more information
  • Branch set to http://github.com/MarkusQ/puppet/tree/ticket/2.6.x/4409

I have not been able to reproduce this (it seems to search the right directories when I try it) but I was getting some warnings and have a branch which fixes those (other than a deprecation notice on changing from foo/plugins to foo/lib) and adds some diagnostics. It’s at

http://github.com/MarkusQ/puppet/tree/ticket/2.6.x/4409

Could someone who is seeing this try with that branch and report back the messages from the master?

Bug #4409: puppetmasterd does not find custom types for environment

  • Author: Rudy Gevaert
  • Status: Needs more information
  • Priority: High
  • Assignee: Markus Roberts
  • Category: plumbing
  • Target version: 2.6.1
  • Affected version: 2.6.0
  • Keywords:
  • Branch: http://github.com/MarkusQ/puppet/tree/ticket/2.6.x/4409

Hello,

I can’t get plugins in modules to work. I tried IRC and puppet-users (http://groups.google.com/group/puppet-users/browse_frm/thread/1fa5616448b1ffad) , all led to no help/solution :(. This is blocking me to deploy puppet in our infrastructure.

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type vcsrepo at /etc/puppet/development/manifests/nodes.pp:37 on node puptest.ugent.be

I have attached several attachments that show my config.

thank you in advance

You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

--
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To post to this group, send email to puppet-bugs <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

tickets | 1 Sep 09:16 2010

[Puppet - Bug #4631] tagging problems in 2.6

Issue #4631 has been updated by Mark Phillips.

    You haven’t managed to reproduce this? So if you use —tags with a module name your testing fires correctly? I thought in your initial update you said it didn’t? —tags with a module name – not necessarily labelled, as you did with your example – in 0.2? would run just that module. In 2.6 it does not.

    If you need anything further from me I’ll be happy to provide any more examples, including longer debug trails, should you require it.

    Bug #4631: tagging problems in 2.6

    • Author: Mark Phillips
    • Status: Needs more information
    • Priority: Normal
    • Assignee:
    • Category: agent
    • Target version:
    • Affected version: 2.6.0
    • Keywords:
    • Branch:

    Hi,

    Has —tags broken in the 2.6.x releases? It doesn’t seem to pay any attention.

    So here I make changes to two modules:

    root <at> apps /etc/puppet/envs/dev/modules # git st M pkgrepo/manifests/init.pp M security/manifests/init.pp

    …then try applying just one of them:

    [root <at> webdav ~]# puppet agent -t --tags pkgrepo info: Caching catalog for webdav info: Applying configuration version '1282836370' notice: Finished catalog run in 0.03 seconds [root <at> webdav ~]# puppet agent -t --tags=pkgrepo info: Caching catalog for webdav info: Applying configuration version '1282836370' notice: Finished catalog run in 0.03 seconds [root <at> webdav ~]# puppet agent -t --tags=pkgrepo::setup info: Caching catalog for webdav info: Applying configuration version '1282836370' notice: Finished catalog run in 0.03 seconds

    …and finally I just run the whole catalog:

    [root <at> webdav ~]# puppet agent -t info: Caching catalog for webdav info: Applying configuration version '1282836370' notice: /Stage[main]/Puppet::Setup/Service[puppet]/ensure: ensure changed 'running' to 'stopped' notice: /Stage[main]/Security::Setup/Ssh_authorized_key[mpaccesstoroot]/ensure: created info: FileBucket adding /root/.ssh/authorized_keys as {md5}aba4c03d0324fb8c4f3961f62f43651e notice: /Stage[main]/Pkgrepo::Setup/Yumrepo[epel-testing]/enabled: enabled changed '0' to '1' notice: Finished catalog run in 0.72 seconds

    ..which works!

    This is 2.6.1rc2 incidentally, although I noted the behaviour was the same with 2.6.0.

    Client:

    [root <at> webdav ~]# facter puppetversion 2.6.1

    Master:

    root <at> apps /etc/puppet/envs/dev/modules # facter puppetversion 2.6.1

    You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

    --
    You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
    To post to this group, send email to puppet-bugs <at> googlegroups.com.
    To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

    tickets | 1 Sep 09:30 2010

    [Puppet - Bug #4409] puppetmasterd does not find custom types for environment

    Issue #4409 has been updated by Rudy Gevaert.

      Dan, I would really appreciate it if you could test that. As you were able to reproduce. I will probably have some ‘free’ time, the earliest, on Friday. And I would still need to try to get to run puppet from that source. I’m running the it with Debian packages. And I don’t it to interfere with the current setup.

      Please Dan :)

      Bug #4409: puppetmasterd does not find custom types for environment

      • Author: Rudy Gevaert
      • Status: Needs more information
      • Priority: High
      • Assignee: Markus Roberts
      • Category: plumbing
      • Target version: 2.6.1
      • Affected version: 2.6.0
      • Keywords:
      • Branch: http://github.com/MarkusQ/puppet/tree/ticket/2.6.x/4409

      Hello,

      I can’t get plugins in modules to work. I tried IRC and puppet-users (http://groups.google.com/group/puppet-users/browse_frm/thread/1fa5616448b1ffad) , all led to no help/solution :(. This is blocking me to deploy puppet in our infrastructure.

      err: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type vcsrepo at /etc/puppet/development/manifests/nodes.pp:37 on node puptest.ugent.be

      I have attached several attachments that show my config.

      thank you in advance

      You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

      --
      You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
      To post to this group, send email to puppet-bugs <at> googlegroups.com.
      To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
      For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

      tickets | 1 Sep 10:50 2010

      [Puppet - Bug #4680] (Unreviewed) No certificates submitted after upgrade to 2.6.0 (from 0.25.4)

      Issue #4680 has been reported by Nico Schottelius.

      Bug #4680: No certificates submitted after upgrade to 2.6.0 (from 0.25.4)

      • Author: Nico Schottelius
      • Status: Unreviewed
      • Priority: Normal
      • Assignee:
      • Category: SSL
      • Target version:
      • Affected version:
      • Keywords:
      • Branch:

      Problem:

      Client should transfer certificate request, master should autosign it.

      Current behaviour:

      Master outputs info: Could not find certificate for ‘ikr31.ethz.ch’ Client outputs

      warning: peer certificate won’t be verified in this SSL session notice: Did not receive certificate

      But there’s no csr on the master. Tried with and without the new auth.conf.

      Details:

      Client:

      root <at> ikr31:~# puppet —version 0.25.4 root <at> ikr31:~# puppetd —server puppet.inf.ethz.ch —test —ca_port 19400 —debug —color no —waitforcert 2 debug: Failed to load library ‘selinux’ for feature ‘selinux’ debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Failed to load library ‘ldap’ for feature ‘ldap’ debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet] debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/private_keys/ikr31.ethz.ch.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys] debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state] debug: /File[/var/run/puppet/puppetd.pid]: Autorequiring File[/var/run/puppet] debug: /File[/var/lib/puppet/ssl/public_keys/ikr31.ethz.ch.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys] debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: Finishing transaction 69844402770620 with 0 changes debug: Using cached certificate for ca, good until Tue Sep 02 13:24:09 UTC 2014 warning: peer certificate won’t be verified in this SSL session debug: Using cached certificate_request for ikr31.ethz.ch, good until debug: Using cached certificate for ca, good until Tue Sep 02 13:24:09 UTC 2014 warning: peer certificate won’t be verified in this SSL session debug: Using cached certificate for ca, good until Tue Sep 02 13:24:09 UTC 2014 warning: peer certificate won’t be verified in this SSL session debug: Using cached certificate for ca, good until Tue Sep 02 13:24:09 UTC 2014 warning: peer certificate won’t be verified in this SSL session notice: Did not receive certificate ^CCancelling startup

      Master:

      [10:38] sans:~# /usr/bin/puppet master —servertype=webrick —masterport=19400 —debug —no-daemonize —color false —trace warning: You have configuration parameter $ssl_client_header specified in [puppetmasterd], which is a deprecated section. I’m assuming you meant [master] warning: You have configuration parameter $templatedir specified in [puppetmasterd], which is a deprecated section. I’m assuming you meant [master] warning: You have configuration parameter $modulepath specified in [puppetmasterd], which is a deprecated section. I’m assuming you meant [master] debug: Failed to load library ‘selinux’ for feature ‘selinux’ debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing debug: /File[/var/lib/puppetmaster/ssl/public_keys/sans.ethz.ch.pem]: Autorequiring File[/var/lib/puppetmaster/ssl/public_keys] debug: /File[/var/lib/puppetmaster/ssl/certs]: Autorequiring File[/var/lib/puppetmaster/ssl] debug: /File[/var/lib/puppetmaster/reports]: Autorequiring File[/var/lib/puppetmaster] debug: /File[/var/lib/puppetmaster/lib]: Autorequiring File[/var/lib/puppetmaster] debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppetmaster/ssl/certificate_requests]: Autorequiring File[/var/lib/puppetmaster/ssl] debug: /File[/var/lib/puppetmaster/server_data]: Autorequiring File[/var/lib/puppetmaster] debug: /File[/var/lib/puppetmaster/ssl/certs/sans.ethz.ch.pem]: Autorequiring File[/var/lib/puppetmaster/ssl/certs] debug: /File[/var/lib/puppetmaster/ssl]: Autorequiring File[/var/lib/puppetmaster] debug: /File[/var/log/puppet/masterhttp.log]: Autorequiring File[/var/log/puppet] debug: /File[/var/lib/puppetmaster/ssl/public_keys]: Autorequiring File[/var/lib/puppetmaster/ssl] debug: /File[/var/lib/puppetmaster/yaml]: Autorequiring File[/var/lib/puppetmaster] debug: /File[/var/lib/puppetmaster/ssl/private_keys/sans.ethz.ch.pem]: Autorequiring File[/var/lib/puppetmaster/ssl/private_keys] debug: /File[/var/lib/puppetmaster/bucket]: Autorequiring File[/var/lib/puppetmaster] debug: /File[/etc/puppet/fileserver.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppetmaster/rrd]: Autorequiring File[/var/lib/puppetmaster] debug: /File[/etc/puppet/manifests]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppetmaster/state]: Autorequiring File[/var/lib/puppetmaster] debug: /File[/var/lib/puppetmaster/facts]: Autorequiring File[/var/lib/puppetmaster] debug: /File[/var/lib/puppetmaster/ssl/private]: Autorequiring File[/var/lib/puppetmaster/ssl] debug: /File[/var/lib/puppetmaster/ssl/private_keys]: Autorequiring File[/var/lib/puppetmaster/ssl] debug: /File[/etc/puppet/manifests/site.pp]: Autorequiring File[/etc/puppet/manifests] debug: /File[/var/lib/puppetmaster/ssl/crl.pem]: Autorequiring File[/var/lib/puppetmaster/ssl] debug: /File[/var/lib/puppetmaster/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppetmaster/ssl/certs] debug: Finishing transaction 70355901938100 debug: /File[/var/lib/puppetmaster/ssl/ca/inventory.txt]: Autorequiring File[/var/lib/puppetmaster/ssl/ca] debug: /File[/var/lib/puppetmaster/ssl/ca/ca_pub.pem]: Autorequiring File[/var/lib/puppetmaster/ssl/ca] debug: /File[/var/lib/puppetmaster/ssl/ca/private/ca.pass]: Autorequiring File[/var/lib/puppetmaster/ssl/ca/private] debug: /File[/var/lib/puppetmaster/ssl/ca/ca_key.pem]: Autorequiring File[/var/lib/puppetmaster/ssl/ca] debug: /File[/var/lib/puppetmaster/ssl/ca/signed]: Autorequiring File[/var/lib/puppetmaster/ssl/ca] debug: /File[/var/lib/puppetmaster/ssl/ca/private]: Autorequiring File[/var/lib/puppetmaster/ssl/ca] debug: /File[/var/lib/puppetmaster/ssl/ca/serial]: Autorequiring File[/var/lib/puppetmaster/ssl/ca] debug: /File[/var/lib/puppetmaster/ssl/ca/ca_crt.pem]: Autorequiring File[/var/lib/puppetmaster/ssl/ca] debug: /File[/var/lib/puppetmaster/ssl/ca/ca_crl.pem]: Autorequiring File[/var/lib/puppetmaster/ssl/ca] debug: /File[/var/lib/puppetmaster/ssl/ca/requests]: Autorequiring File[/var/lib/puppetmaster/ssl/ca] debug: Finishing transaction 70355900300400 debug: Using cached certificate for ca debug: Using cached certificate for ca debug: Using cached certificate for sans.ethz.ch notice: Starting Puppet master version 2.6.0 err: Removing mount files: /etc/puppet/files does not exist info: mount[files]: allowing 129.132.12.0/24 access [… many more permissions allowed…] debug: No modules mount given; autocreating with default permissions debug: Finishing transaction 70355918274780 info: Inserting default ‘~ ^/catalog/([/]+)$‘(auth) acl because /etc/puppet/auth.conf doesn’t exist info: Inserting default ’/file'(non-auth) acl because /etc/puppet/auth.conf doesn’t exist info: Inserting default ‘/certificate_revocation_list/ca’(auth) acl because /etc/puppet/auth.conf doesn’t exist info: Inserting default ‘/report’(auth) acl because /etc/puppet/auth.conf doesn’t exist info: Inserting default ‘/certificate/ca’(non-auth) acl because /etc/puppet/auth.conf doesn’t exist info: Inserting default ‘/certificate/’(non-auth) acl because /etc/puppet/auth.conf doesn’t exist info: Inserting default ‘/certificate_request’(non-auth) acl because /etc/puppet/auth.conf doesn’t exist info: Inserting default ‘/status’(auth) acl because /etc/puppet/auth.conf doesn’t exist info: Inserting default ‘/resource’(auth) acl because /etc/puppet/auth.conf doesn’t exist info: Could not find certificate for ‘ikr31.ethz.ch’

      You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

      --
      You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
      To post to this group, send email to puppet-bugs <at> googlegroups.com.
      To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
      For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

      tickets | 1 Sep 13:18 2010

      [Puppet - Bug #3049] Several bits of the language are order dependant

      Issue #3049 has been updated by Robert Gerlach.

        As long as this does not work, the samples in http://docs.puppetlabs.com/guides/templating.html should be removed.

        Bug #3049: Several bits of the language are order dependant

        • Author: R.I. Pienaar aka Volcane
        • Status: Needs design decision
        • Priority: Normal
        • Assignee: Markus Roberts
        • Category: language
        • Target version:
        • Affected version: 0.25.4rc1
        • Keywords:
        • Branch:

        I am filing this as a bug, could be a feature request too?

        anyway, puppet is pointedly a order independent language this is a major tenant of how things work and how manifests gets constructed, nodes populated and so forth – this is probably a discussion on its own but thats my view.

        Assuming we agree its all independent of order then functions like defined() should not exhibit weird behavior that is order dependent, this bug is to fix those.

        Same holds true for inside templates the variables all_tags and classes

        You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

        --
        You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
        To post to this group, send email to puppet-bugs <at> googlegroups.com.
        To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
        For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

        tickets | 1 Sep 16:15 2010

        [Puppet - Bug #4681] (Unreviewed) Puppet 2.6.1.r2 randomly hangs on Exec in FreeBSD

        Issue #4681 has been reported by Fredrik Eriksson.

        Bug #4681: Puppet 2.6.1.r2 randomly hangs on Exec in FreeBSD

        • Author: Fredrik Eriksson
        • Status: Unreviewed
        • Priority: Normal
        • Assignee:
        • Category: FreeBSD
        • Target version:
        • Affected version:
        • Keywords:
        • Branch:

        relevant info from pkg_info:

        • ruby-1.8.7.248_3,1 (compiled with debug)
        • puppet-2.6.1.r2
        • facter-1.5.7_1
        uname -a FreeBSD localhost 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Wed Jul 28 11:44:21 UTC 2010 root <at> localhost:/usr/obj/usr/src/sys/GENERIC amd64

        I did also see this problem in FreeBSD 8.0 and puppet 0.25. Puppet does not hang every time it’s run, only on random Exec statements. When debugging this I simply created an endless loop which ran the puppet configuration until it hang. Sometimes it would only run a few times before it hang and sometimes it run for hours. The manifest is quite big, but contains some sensitive stuff so I can’t upload it here, but this is probably reproducable with any manifest that uses a great deal of Exec statements.

        A few examples of output when it hang with command ‘ruby18 —debug /usr/local/bin/puppet agent —test —debug —trace’:

        /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized debug: /Stage[main]/Webbase::Backup/Line[sudo_backup]/Exec[echo 'backup ALL= ( root ) NOPASSWD: /usr/sbin/backup' >> '/usr/local/etc/sudoers']: Executing check '/usr/bin/grep -qFx 'backup ALL= ( root ) NOPASSWD: /usr/sbin/backup' '/usr/local/etc/sudoers'' debug: Executing '/usr/bin/grep -qFx 'backup ALL= ( root ) NOPASSWD: /usr/sbin/backup' '/usr/local/etc/sudoers'' removing /tmp/puppet20100901-36732-16mgs1p-0...done [here puppet hangs] debug: /Stage[main]/Webbase::Apache/Exec[apache_purge]: Executing check '/bin/test -e /usr/local/etc/apache/ssl.crt' debug: Executing '/bin/test -e /usr/local/etc/apache/ssl.crt' removing /tmp/puppet20100901-50535-1p6j13j-0...done [here puppet hangs] /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized debug: /Stage[main]/Webbase::Nas/Exec[/sbin/mount /proc]: Executing check '/sbin/mount | /usr/bin/egrep ^procfs' debug: Executing '/sbin/mount | /usr/bin/egrep ^procfs' removing /tmp/puppet20100901-95974-1n5jg13-0...done [here puppet hangs]

        Since I have very little experience debugging stuff, and no previous experience with ruby I just hacked in a few debug statements in type/exec.rb, and the relevant code appears to be this code from the run function:

        withenv environment do Timeout::timeout(self[:timeout]) do output, status = Puppet::Util::SUIDManager.run_and_capture( [command], self[:user], self[:group] ) Puppet.debug "returned from run_and_capture #{self[:timeout]}" end Puppet.debug "timeout ended" # The shell returns 127 if the command is missing. if status.exitstatus == 127 Puppet.debug "argument error" raise ArgumentError, output end Puppet.debug "no argument error" end

        When puppet hangs it is after

        Puppet.debug "returned from run_and_capture #{self[:timeout]}"

        but before

        Puppet.debug "timeout ended"

        Since I don’t really have time to figure out how the timeout –> do –> end thing works I’ll just file this bug here so hopefully someone can say if this is a bug in puppet or an upstream bug in ruby. Let me know if you need any more info.

        You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

        --
        You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
        To post to this group, send email to puppet-bugs <at> googlegroups.com.
        To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
        For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

        tickets | 1 Sep 17:00 2010

        [Puppet - Bug #3363] (Closed) Puppet Master webrick server doesn't work with Ruby Enterprise Edition

        Issue #3363 has been updated by Markus Roberts.
        • Status changed from Accepted to Closed

        It’s a bug, but not our bug.

        Bug #3363: Puppet Master webrick server doesn't work with Ruby Enterprise Edition

        • Author: Jeff McCune
        • Status: Closed
        • Priority: Low
        • Assignee:
        • Category: server
        • Target version:
        • Affected version: 0.25.4
        • Keywords: ree rubyenterprise passenger sk_x509_num undefined symbol
        • Branch:

        While debugging, I notice that Ruby Enterprise Edition does not work correctly with puppetmasterd when running within the webrick server.

        This is almost certainly an issue with ruby enterprise edition, but I’m documenting the issue here since it has bit other people as well (http://urgetopunt.com/puppet/2010/02/28/running-puppet-with-ree.html)

        This is ruby-enterprise-1.8.7-2010.01, passenger 2.2.11 and Puppet 0.25.4.

        When starting the puppet master using: /opt/ruby-enterprise/bin/puppetmasterd --config /etc/puppet/puppetmasterd.conf --no-daemonize --servertype webrick --debug --trace

        The server starts fine, but as soon as an SSL client connects, ruby totally bombs out: /opt/ruby-enterprise/bin/ruby: symbol lookup error: /opt/ruby-enterprise/lib/ruby/1.8/x86_64-linux/openssl.so: undefined symbol: sk_x509_num

        Workaround: Don’t run puppetmaster using webrick with Ruby Enterprise Edition. Instead, allow apache or some other HTTP server to handle the SSL connection.

        You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

        --
        You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
        To post to this group, send email to puppet-bugs <at> googlegroups.com.
        To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
        For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

        tickets | 1 Sep 19:17 2010

        [Puppet - Bug #4631] tagging problems in 2.6

        Issue #4631 has been updated by Nan Liu.

          It’s a problem with implicit tags on resources rather than explicit tags. Here’s a simple test case:

          class a { notify { “hello a”: } } class b { notify { “hello b”: } } include a, b

          0.25.5:

          puppet -v —tags b implicit_tags.pp

          info: Applying configuration version ‘1281767179’ notice: hello b notice: //b/Notify[hello b]/message: defined ‘message’ as ‘hello b’

          2.6:

          puppet -v —tags b implicit_tags.pp

          info: Applying configuration version ‘1281767216’

          See following email thread: http://groups.google.com/group/puppet-users/browse_thread/thread/9d7bb94a8f9c240/d18e83876452b072?lnk=gst&q=tags#d18e83876452b072

          Bug #4631: tagging problems in 2.6

          • Author: Mark Phillips
          • Status: Needs more information
          • Priority: Normal
          • Assignee:
          • Category: agent
          • Target version:
          • Affected version: 2.6.0
          • Keywords:
          • Branch:

          Hi,

          Has —tags broken in the 2.6.x releases? It doesn’t seem to pay any attention.

          So here I make changes to two modules:

          root <at> apps /etc/puppet/envs/dev/modules # git st M pkgrepo/manifests/init.pp M security/manifests/init.pp

          …then try applying just one of them:

          [root <at> webdav ~]# puppet agent -t --tags pkgrepo info: Caching catalog for webdav info: Applying configuration version '1282836370' notice: Finished catalog run in 0.03 seconds [root <at> webdav ~]# puppet agent -t --tags=pkgrepo info: Caching catalog for webdav info: Applying configuration version '1282836370' notice: Finished catalog run in 0.03 seconds [root <at> webdav ~]# puppet agent -t --tags=pkgrepo::setup info: Caching catalog for webdav info: Applying configuration version '1282836370' notice: Finished catalog run in 0.03 seconds

          …and finally I just run the whole catalog:

          [root <at> webdav ~]# puppet agent -t info: Caching catalog for webdav info: Applying configuration version '1282836370' notice: /Stage[main]/Puppet::Setup/Service[puppet]/ensure: ensure changed 'running' to 'stopped' notice: /Stage[main]/Security::Setup/Ssh_authorized_key[mpaccesstoroot]/ensure: created info: FileBucket adding /root/.ssh/authorized_keys as {md5}aba4c03d0324fb8c4f3961f62f43651e notice: /Stage[main]/Pkgrepo::Setup/Yumrepo[epel-testing]/enabled: enabled changed '0' to '1' notice: Finished catalog run in 0.72 seconds

          ..which works!

          This is 2.6.1rc2 incidentally, although I noted the behaviour was the same with 2.6.0.

          Client:

          [root <at> webdav ~]# facter puppetversion 2.6.1

          Master:

          root <at> apps /etc/puppet/envs/dev/modules # facter puppetversion 2.6.1

          You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

          --
          You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
          To post to this group, send email to puppet-bugs <at> googlegroups.com.
          To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
          For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

          tickets | 1 Sep 20:14 2010

          [Puppet - Bug #4681] (Investigating) Puppet 2.6.1.r2 randomly hangs on Exec in FreeBSD

          Issue #4681 has been updated by Markus Roberts.
          • Status changed from Unreviewed to Investigating
          • Assignee set to Markus Roberts
          • Affected version set to 0.25.5

          Thanks for the excellent bug report.

          Bug #4681: Puppet 2.6.1.r2 randomly hangs on Exec in FreeBSD

          • Author: Fredrik Eriksson
          • Status: Investigating
          • Priority: Normal
          • Assignee: Markus Roberts
          • Category: FreeBSD
          • Target version:
          • Affected version: 0.25.5
          • Keywords:
          • Branch:

          relevant info from pkg_info:

          • ruby-1.8.7.248_3,1 (compiled with debug)
          • puppet-2.6.1.r2
          • facter-1.5.7_1
          uname -a FreeBSD localhost 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Wed Jul 28 11:44:21 UTC 2010 root <at> localhost:/usr/obj/usr/src/sys/GENERIC amd64

          I did also see this problem in FreeBSD 8.0 and puppet 0.25. Puppet does not hang every time it’s run, only on random Exec statements. When debugging this I simply created an endless loop which ran the puppet configuration until it hang. Sometimes it would only run a few times before it hang and sometimes it run for hours. The manifest is quite big, but contains some sensitive stuff so I can’t upload it here, but this is probably reproducable with any manifest that uses a great deal of Exec statements.

          A few examples of output when it hang with command ‘ruby18 —debug /usr/local/bin/puppet agent —test —debug —trace’:

          /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized debug: /Stage[main]/Webbase::Backup/Line[sudo_backup]/Exec[echo 'backup ALL= ( root ) NOPASSWD: /usr/sbin/backup' >> '/usr/local/etc/sudoers']: Executing check '/usr/bin/grep -qFx 'backup ALL= ( root ) NOPASSWD: /usr/sbin/backup' '/usr/local/etc/sudoers'' debug: Executing '/usr/bin/grep -qFx 'backup ALL= ( root ) NOPASSWD: /usr/sbin/backup' '/usr/local/etc/sudoers'' removing /tmp/puppet20100901-36732-16mgs1p-0...done [here puppet hangs] debug: /Stage[main]/Webbase::Apache/Exec[apache_purge]: Executing check '/bin/test -e /usr/local/etc/apache/ssl.crt' debug: Executing '/bin/test -e /usr/local/etc/apache/ssl.crt' removing /tmp/puppet20100901-50535-1p6j13j-0...done [here puppet hangs] /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized debug: /Stage[main]/Webbase::Nas/Exec[/sbin/mount /proc]: Executing check '/sbin/mount | /usr/bin/egrep ^procfs' debug: Executing '/sbin/mount | /usr/bin/egrep ^procfs' removing /tmp/puppet20100901-95974-1n5jg13-0...done [here puppet hangs]

          Since I have very little experience debugging stuff, and no previous experience with ruby I just hacked in a few debug statements in type/exec.rb, and the relevant code appears to be this code from the run function:

          withenv environment do Timeout::timeout(self[:timeout]) do output, status = Puppet::Util::SUIDManager.run_and_capture( [command], self[:user], self[:group] ) Puppet.debug "returned from run_and_capture #{self[:timeout]}" end Puppet.debug "timeout ended" # The shell returns 127 if the command is missing. if status.exitstatus == 127 Puppet.debug "argument error" raise ArgumentError, output end Puppet.debug "no argument error" end

          When puppet hangs it is after

          Puppet.debug "returned from run_and_capture #{self[:timeout]}"

          but before

          Puppet.debug "timeout ended"

          Since I don’t really have time to figure out how the timeout –> do –> end thing works I’ll just file this bug here so hopefully someone can say if this is a bug in puppet or an upstream bug in ruby. Let me know if you need any more info.

          You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

          --
          You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
          To post to this group, send email to puppet-bugs <at> googlegroups.com.
          To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
          For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.

          tickets | 1 Sep 20:35 2010

          [Puppet - Bug #4681] (Accepted) Puppet 2.6.1.r2 randomly hangs on Exec in FreeBSD

          Issue #4681 has been updated by Markus Roberts.
          • Status changed from Investigating to Accepted

          Looking at the code in question:

          def timeout(sec, klass = nil) return yield if sec == nil or sec.zero? raise ThreadError, "timeout within critical session" if Thread.critical exception = klass || Class.new(ExitException) begin x = Thread.current y = Thread.start { begin sleep sec rescue => e x.raise e else x.raise exception, "execution expired" if x.alive? end } yield sec # return true rescue exception => e [snip] ensure if y and y.alive? y.kill y.join # make sure y is dead. end end

          it appears ruby isn’t being sufficiently paranoid with regard to thread critical and we (or another library) aren’t being sufficiently careful. It’s pretty easy to construct a case in which the time-out doesn’t occur:

          require "timeout" begin Timeout::timeout(1) { p "foo" sleep 200 } rescue Timeout::Error puts "timed-out" end begin Timeout::timeout(1) { Thread.critical = true p "bar" sleep 200 } rescue Timeout::Error puts "timed-out" end

          but that’s still short of explaining the hang as described, in that it would still require the underlying code to hang and add the additional complication (clue?) that this happen in a critical region.

          The next question is probably how can run_and_capture return while still leaving things in an odd state (e.g. Thread.critical = true, dangling joins, or…)?

          Bug #4681: Puppet 2.6.1.r2 randomly hangs on Exec in FreeBSD

          • Author: Fredrik Eriksson
          • Status: Accepted
          • Priority: Normal
          • Assignee: Markus Roberts
          • Category: FreeBSD
          • Target version:
          • Affected version: 0.25.5
          • Keywords:
          • Branch:

          relevant info from pkg_info:

          • ruby-1.8.7.248_3,1 (compiled with debug)
          • puppet-2.6.1.r2
          • facter-1.5.7_1
          uname -a FreeBSD localhost 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Wed Jul 28 11:44:21 UTC 2010 root <at> localhost:/usr/obj/usr/src/sys/GENERIC amd64

          I did also see this problem in FreeBSD 8.0 and puppet 0.25. Puppet does not hang every time it’s run, only on random Exec statements. When debugging this I simply created an endless loop which ran the puppet configuration until it hang. Sometimes it would only run a few times before it hang and sometimes it run for hours. The manifest is quite big, but contains some sensitive stuff so I can’t upload it here, but this is probably reproducable with any manifest that uses a great deal of Exec statements.

          A few examples of output when it hang with command ‘ruby18 —debug /usr/local/bin/puppet agent —test —debug —trace’:

          /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized debug: /Stage[main]/Webbase::Backup/Line[sudo_backup]/Exec[echo 'backup ALL= ( root ) NOPASSWD: /usr/sbin/backup' >> '/usr/local/etc/sudoers']: Executing check '/usr/bin/grep -qFx 'backup ALL= ( root ) NOPASSWD: /usr/sbin/backup' '/usr/local/etc/sudoers'' debug: Executing '/usr/bin/grep -qFx 'backup ALL= ( root ) NOPASSWD: /usr/sbin/backup' '/usr/local/etc/sudoers'' removing /tmp/puppet20100901-36732-16mgs1p-0...done [here puppet hangs] debug: /Stage[main]/Webbase::Apache/Exec[apache_purge]: Executing check '/bin/test -e /usr/local/etc/apache/ssl.crt' debug: Executing '/bin/test -e /usr/local/etc/apache/ssl.crt' removing /tmp/puppet20100901-50535-1p6j13j-0...done [here puppet hangs] /usr/local/lib/ruby/site_ruby/1.8/puppet/type.rb:1881: warning: instance variable <at> virtual not initialized debug: /Stage[main]/Webbase::Nas/Exec[/sbin/mount /proc]: Executing check '/sbin/mount | /usr/bin/egrep ^procfs' debug: Executing '/sbin/mount | /usr/bin/egrep ^procfs' removing /tmp/puppet20100901-95974-1n5jg13-0...done [here puppet hangs]

          Since I have very little experience debugging stuff, and no previous experience with ruby I just hacked in a few debug statements in type/exec.rb, and the relevant code appears to be this code from the run function:

          withenv environment do Timeout::timeout(self[:timeout]) do output, status = Puppet::Util::SUIDManager.run_and_capture( [command], self[:user], self[:group] ) Puppet.debug "returned from run_and_capture #{self[:timeout]}" end Puppet.debug "timeout ended" # The shell returns 127 if the command is missing. if status.exitstatus == 127 Puppet.debug "argument error" raise ArgumentError, output end Puppet.debug "no argument error" end

          When puppet hangs it is after

          Puppet.debug "returned from run_and_capture #{self[:timeout]}"

          but before

          Puppet.debug "timeout ended"

          Since I don’t really have time to figure out how the timeout –> do –> end thing works I’ll just file this bug here so hopefully someone can say if this is a bug in puppet or an upstream bug in ruby. Let me know if you need any more info.

          You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account

          --
          You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
          To post to this group, send email to puppet-bugs <at> googlegroups.com.
          To unsubscribe from this group, send email to puppet-bugs+unsubscribe <at> googlegroups.com.
          For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.


          Gmane