Jira (PUP-10504) remote filebucket operation generates errors in puppet 6.15

9 views
Skip to first unread message

Vadym Chepkov (Jira)

unread,
May 12, 2020, 4:58:03 PM5/12/20
to puppe...@googlegroups.com
Vadym Chepkov updated an issue
 
Puppet / Bug PUP-10504
remote filebucket operation generates errors in puppet 6.15
Change By: Vadym Chepkov
Summary: remote filebucket broken operation generates errors in puppet 6.15
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Vadym Chepkov (Jira)

unread,
May 12, 2020, 5:12:03 PM5/12/20
to puppe...@googlegroups.com
Vadym Chepkov commented on Bug PUP-10504
 
Re: remote filebucket operation generates errors in puppet 6.15

By Nick Walker suggestion restarted pe-puppetserver one more time and problem seems went away

Server was stopped started during upgrade, so not sure why it had this effect

# grep pe-puppetserver /var/log/messages
May 12 19:09:13 puppet systemd[1]: Stopping pe-puppetserver Service...
May 12 19:09:17 puppet systemd[1]: Stopped pe-puppetserver Service.
May 12 19:13:19 puppet systemd[1]: Starting pe-puppetserver Service...
May 12 19:14:00 puppet systemd[1]: Started pe-puppetserver Service.
May 12 20:58:15 puppet systemd[1]: Stopping pe-puppetserver Service...
May 12 20:58:20 puppet systemd[1]: Stopped pe-puppetserver Service.
May 12 20:58:20 puppet systemd[1]: Starting pe-puppetserver Service...
May 12 20:58:57 puppet systemd[1]: Started pe-puppetserver Service.

Nick Walker (Jira)

unread,
May 12, 2020, 5:22:03 PM5/12/20
to puppe...@googlegroups.com
Nick Walker commented on Bug PUP-10504

I installed 2019.5, enabled filebucket, then upgraded to 2019.7 and I cannot reproduce the error.

Vadym Chepkov (Jira)

unread,
May 12, 2020, 5:40:04 PM5/12/20
to puppe...@googlegroups.com

The problem happens on the agent, so previous restart was unnecessary.

This happens when 6.14 agent pulls new 6.15 package using puppetlabs/puppet_agent module

 

May 12 21:25:26 fedora puppet-agent[462009]: Starting Puppet client version 6.14.0
May 12 21:28:22 fedora puppet-agent[462319]: Starting Puppet client version 6.15.0
May 12 21:28:23 fedora puppet-agent[462027]: (/Stage[main]/Puppet_agent::Install/Package[puppet-agent]/ensure) ensure changed '6.14.0-1.fc31' to '6.15.0' (corrective)
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content)
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) --- /etc/puppetlabs/pxp-agent/pxp-agent.conf#0112020-05-12 21:25:03.042305755 +0000
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) +++ /tmp/puppet-file20200512-462027-1sgvc3w#0112020-05-12 21:28:28.420770424 +0000
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) @@ -1 +1 @@
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) -{"broker-ws-uris":["wss://puppet.chepkov.lan:8142/pcp2/"],"pcp-version":"2","master-uris":["puppet.chepkov.lan"],"ssl-key":"/etc/puppetlabs/puppet/ssl/private_keys/fedora.chepkov.lan.pem","ssl-cert":"/etc/puppetlabs/puppet/ssl/certs/fedora.chepkov.lan.pem","ssl-ca-cert":"/etc/puppetlabs/puppet/ssl/certs/ca.pem","loglevel":"info"}
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) +{"broker-ws-uris":["wss://puppet.chepkov.lan:8142/pcp2/"],"pcp-version":"2","master-uris":["puppet.chepkov.lan"],"ssl-crl":"/etc/puppetlabs/puppet/ssl/crl.pem","ssl-key":"/etc/puppetlabs/puppet/ssl/private_keys/fedora.chepkov.lan.pem","ssl-cert":"/etc/puppetlabs/puppet/ssl/certs/fedora.chepkov.lan.pem","ssl-ca-cert":"/etc/puppetlabs/puppet/ssl/certs/ca.pem","loglevel":"info"}
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) \ No newline at end of file
May 12 21:28:28 fedora puppet-agent[462027]: Could not back up /etc/puppetlabs/pxp-agent/pxp-agent.conf: undefined method `head_filebucket_file' for #<Puppet::HTTP::Service::Compiler:0x0000000002f3d930>
May 12 21:28:28 fedora puppet-agent[462027]: Could not back up /etc/puppetlabs/pxp-agent/pxp-agent.conf: undefined method `head_filebucket_file' for #<Puppet::HTTP::Service::Compiler:0x0000000002f3d930>
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content)
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) --- /etc/puppetlabs/pxp-agent/pxp-agent.conf#0112020-05-12 21:25:03.042305755 +0000
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) +++ /tmp/puppet-file20200512-462027-1wwb50p#0112020-05-12 21:28:28.695775064 +0000
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) @@ -1 +1 @@
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) -{"broker-ws-uris":["wss://puppet.chepkov.lan:8142/pcp2/"],"pcp-version":"2","master-uris":["puppet.chepkov.lan"],"ssl-key":"/etc/puppetlabs/puppet/ssl/private_keys/fedora.chepkov.lan.pem","ssl-cert":"/etc/puppetlabs/puppet/ssl/certs/fedora.chepkov.lan.pem","ssl-ca-cert":"/etc/puppetlabs/puppet/ssl/certs/ca.pem","loglevel":"info"}
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) +{"broker-ws-uris":["wss://puppet.chepkov.lan:8142/pcp2/"],"pcp-version":"2","master-uris":["puppet.chepkov.lan"],"ssl-crl":"/etc/puppetlabs/puppet/ssl/crl.pem","ssl-key":"/etc/puppetlabs/puppet/ssl/private_keys/fedora.chepkov.lan.pem","ssl-cert":"/etc/puppetlabs/puppet/ssl/certs/fedora.chepkov.lan.pem","ssl-ca-cert":"/etc/puppetlabs/puppet/ssl/certs/ca.pem","loglevel":"info"}
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) \ No newline at end of file
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent/File[/etc/puppetlabs/pxp-agent/pxp-agent.conf]/content) change from '{md5}dec156e1a1a466d76cc56125332d9a9a' to '{md5}17b9c0633aefa8332f8bb6df2f9b9020' failed: Could not back up /etc/puppetlabs/pxp-agent/pxp-agent.conf: undefined method `head_filebucket_file' for #<Puppet::HTTP::Service::Compiler:0x0000000002f3d930> (corrective)
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent::Service/Service[pxp-agent]) Dependency File[/etc/puppetlabs/pxp-agent/pxp-agent.conf] has failures: true
May 12 21:28:28 fedora puppet-agent[462027]: (/Stage[main]/Puppet_enterprise::Pxp_agent::Service/Service[pxp-agent]) Skipping because of failed dependencies
May 12 21:28:29 fedora puppet-agent[462027]: Applied catalog in 131.28 seconds

 

 

Josh Cooper (Jira)

unread,
May 12, 2020, 6:14:03 PM5/12/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10504

If you use the puppet_agent module to upgrade from 6.14 to 6.15 and later during the same catalog run try to save a file to a remote filebucket (such as overwriting a file resource like pxp.conf), then the old 6.14 ruby process will load the new 6.15 Puppet::Indirector::FileBucket::Rest terminus. However, the 6.14 version of Puppet::HTTP::Service::Compiler will have already been loaded due to the catalog request, and that version of the code doesn't implement the new head_filebucket_file method.

The real issue here is that the puppet_agent module needs to stop the puppet transaction immediately after upgrading the puppet-agent package, and restart the run so that we don't mix versions of puppet code. Puppet has the ability to do this by calling Puppet::Application.stop!, but you need a custom type/provider to call that. For example the reboot module calls it so it can reboot the machine midway through the transaction, and then resume the next time the catalog is applied. We need something similar for the puppet_agent module, but we just need to restart the puppet process, not the machine.

Reply all
Reply to author
Forward
0 new messages