Monday, June 15, 2020

Client Error: /Stage[main]/Puppet_agent::Install/Package[puppet-agent]/ensure: change from '5.5.18-1.el7' to '5.5.17'

PROBLEM:

[root@client ~]# puppet agent -t

Info: Using configured environment 'production'

Info: Retrieving pluginfacts

Info: Retrieving plugin

Info: Retrieving locales

Info: Loading facts

Info: Caching catalog for client.com

Info: Applying configuration version '1592088269'

Error: Could not update: Execution of '/bin/yum -d 0 -e 0 -y downgrade puppet-agent-5.5.17' returned 1: Error: Nothing to do

Error: /Stage[main]/Puppet_agent::Install/Package[puppet-agent]/ensure: change from '5.5.18-1.el7' to '5.5.17' failed: Could not update: Execution of '/bin/yum -d 0 -e 0 -y downgrade puppet-agent-5.5.17' returned 1: Error: Nothing to do

Notice: Applied catalog in 3.95 seconds

[root@client ~]#  

SOLUTION:

https://puppet.com/docs/pe/latest/installing_agents.html

Add classes to the PE Master node group for each agent platform used in your environment. For example, pe_repo::platform::el_7_x86_64.

 

If that doesn't work, try deploying the production environment.

puppet access login --service-url https://$(hostname -f):4433/rbac-api --lifetime 5d

puppet code deploy production --wait



Saturday, June 13, 2020

Error 500 on SERVER: Server Error: Could not find class puppet_agent for mom.com on node mom.com

PROBLEM:
[root@MoM]# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not find class puppet_agent for mom.com on node mom.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
SOLUTION:
Deploy the production environment.
puppet access login --service-url https://$(hostname -f):4433/rbac-api --lifetime 5d                              puppet code deploy production --wait
puppet agent -t

Also, make sure these lines are in Puppetfile:  
   mod 'puppetlabs-puppet_agent'
   mod 'puppetlabs-stdlib'