Darragh Bailey
2018-11-27 18:10:53 UTC
Hi,
Currently in the process of testing out an upgrade to version 5 of the
puppet-agent within our local virtual environment used to validate changes
before they can be landed and I'm running into a few problems around the
report at the end run.
Have 5 VMs in a vagrant environment, that are initially bootstrapped with
some scripts to get the puppet 5 packages installed, then uses puppet apply
to perform some initial setup around network/apt-caching, followed by
applying the 'puppet_server' provisioner which runs puppet agent.
Unfortunately I'm seeing an error, that doesn't occur on all the VM's and
I'm not sure how to debug it further or understand what's missing.
vagrant up
...
==> srv-1: Warning: Event['previous_value'] contains a Process::Status
value. It will be converted to the String 'pid 30408 exit 1'
==> srv-1: Warning: Event['previous_value'] contains a Process::Status
value. It will be converted to the String 'pid 32434 exit 1'
==> srv-1: Error: Could not send report: Error 400 on SERVER: Bad Request:
The request body is invalid: Could not intern from json: Internal Error:
Puppet Context ':loaders' missing
....
==> srv-3: Warning: Event['previous_value'] contains a Process::Status
value. It will be converted to the String 'pid 28777 exit 1'
==> srv-3: Error: Could not send report: Error 400 on SERVER: Bad Request:
The request body is invalid: Could not intern from json: Internal Error:
Puppet Context ':loaders' missing
What is also surprising is that it doesn't occur on all of the VM's, and
subsequently it doesn't appear if I re-run the provisioning with: vagrant
up --provision --provision-with puppet_server
There was a suggestion that there could be some stale code around as the
image starts with puppet 3 pre-installed, but I've got the bootstrapping
scripts to purge the old packages and delete any files that could have been
placed under /var/lib/puppet and /etc/puppet
bash code:
package=puppet5-release-xenial.deb
env https_proxy=$HTTPS_PROXY wget \
--quiet --continue -O /tmp/$package https://apt.puppetlabs.com/$package
dpkg -i /tmp/$package
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get purge --yes puppet hiera facter
rm -rf /var/lib/puppet /etc/puppet
apt-get install --yes --no-install-recommends puppet-agent=5.3.5-1xenial
ruby policykit-1
Currently pinned to 5.3.5 because there was an issues with a subsequent
release and decided to just pin to the same version as the upgraded puppet
master was running.
I've tried switching the clients to 5.5.8 and I get the same error, so it's
not solved by moving to the most recent version.
Grep'ing through /var/lib/puppet hasn't been illuminating, didn't spot
anything when switching it to use debug, and neither has been inspecting
the puppet master log so I'm not sure where exactly to look?
The quick fix is to disable reporting within the virtual environment, which
certainly solves the problem, but seems like the wrong approach.
Any thoughts on how to debug this? What do I need to enable on the puppet
master to be able to capture report requests both good and bad so I can see
what it is that is being sent that gets rejected, and what should be sent?
--
Darragh Bailey
Currently in the process of testing out an upgrade to version 5 of the
puppet-agent within our local virtual environment used to validate changes
before they can be landed and I'm running into a few problems around the
report at the end run.
Have 5 VMs in a vagrant environment, that are initially bootstrapped with
some scripts to get the puppet 5 packages installed, then uses puppet apply
to perform some initial setup around network/apt-caching, followed by
applying the 'puppet_server' provisioner which runs puppet agent.
Unfortunately I'm seeing an error, that doesn't occur on all the VM's and
I'm not sure how to debug it further or understand what's missing.
vagrant up
...
==> srv-1: Warning: Event['previous_value'] contains a Process::Status
value. It will be converted to the String 'pid 30408 exit 1'
==> srv-1: Warning: Event['previous_value'] contains a Process::Status
value. It will be converted to the String 'pid 32434 exit 1'
==> srv-1: Error: Could not send report: Error 400 on SERVER: Bad Request:
The request body is invalid: Could not intern from json: Internal Error:
Puppet Context ':loaders' missing
....
==> srv-3: Warning: Event['previous_value'] contains a Process::Status
value. It will be converted to the String 'pid 28777 exit 1'
==> srv-3: Error: Could not send report: Error 400 on SERVER: Bad Request:
The request body is invalid: Could not intern from json: Internal Error:
Puppet Context ':loaders' missing
What is also surprising is that it doesn't occur on all of the VM's, and
subsequently it doesn't appear if I re-run the provisioning with: vagrant
up --provision --provision-with puppet_server
There was a suggestion that there could be some stale code around as the
image starts with puppet 3 pre-installed, but I've got the bootstrapping
scripts to purge the old packages and delete any files that could have been
placed under /var/lib/puppet and /etc/puppet
bash code:
package=puppet5-release-xenial.deb
env https_proxy=$HTTPS_PROXY wget \
--quiet --continue -O /tmp/$package https://apt.puppetlabs.com/$package
dpkg -i /tmp/$package
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get purge --yes puppet hiera facter
rm -rf /var/lib/puppet /etc/puppet
apt-get install --yes --no-install-recommends puppet-agent=5.3.5-1xenial
ruby policykit-1
Currently pinned to 5.3.5 because there was an issues with a subsequent
release and decided to just pin to the same version as the upgraded puppet
master was running.
I've tried switching the clients to 5.5.8 and I get the same error, so it's
not solved by moving to the most recent version.
Grep'ing through /var/lib/puppet hasn't been illuminating, didn't spot
anything when switching it to use debug, and neither has been inspecting
the puppet master log so I'm not sure where exactly to look?
The quick fix is to disable reporting within the virtual environment, which
certainly solves the problem, but seems like the wrong approach.
Any thoughts on how to debug this? What do I need to enable on the puppet
master to be able to capture report requests both good and bad so I can see
what it is that is being sent that gets rejected, and what should be sent?
--
Darragh Bailey
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7eb96a09-bc89-4b02-b014-9dcaef16612e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7eb96a09-bc89-4b02-b014-9dcaef16612e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.