Why re-registering a host or a capsule to Satellite fails with error "Validation failed: Puppet Capsule does not have the Puppet feature, Puppet ca Capsule does not have the Puppet CA feature (HTTP error code 422: Unprocessable Entity)"?
Environment
- Red Hat Satellite 6.
- Puppet configuration management has been disabled
Issue
-
A Satellite capsule somehow lost its
subscription-managerregistration to the Satellite as a Satellite host. -
Attempting to re-register the capsule fails with the following error message:
[root@capsule]# subscription-manager register --org="acme" --activationkey="ak_rhel8_satellite-capsule-ccv" --force Validation failed: Puppet Capsule does not have the Puppet feature, Puppet ca Capsule does not have the Puppet CA feature (HTTP error code 422: Unprocessable Entity)
Resolution
-
In the web ui, access
Hosts->All Hosts, find the capsule or host that is failing to re-register and click on it, click theEditbutton at the top right of the page and check, within the default tabHost, if propertiesPuppet CapsuleandPuppet CA Capsulehave any value set.
If they do, please clear these values, click buttonSubmitto save the changes and try to register once more. -
Perform the following steps to find all the hosts facing this issue and apply the resolution in bulk:
-
Take a backup or a snapshot of your Red Hat Satellite server.
-
Identify the value of the
puppet_ca_proxy_idand thepuppet_proxy_id, replacingclient.example.comwith your host that uses the old puppet reference.# su - postgres -c "psql -x -d foreman -c \"select name, puppet_proxy_id, puppet_ca_proxy_id from hosts where name like 'client.example.com'\"" -
Identify the name of the puppet proxy that is no longer running, replacing
id=1to match the id of thepuppet_proxy_idreturned from the first SQL query:# su - postgres -c "psql -x -d foreman -c \"select name, id from smart_proxies where id=1\"" -
Find all hosts using this puppet proxy, and set their values to nil:
-
Assign the puppet proxy id to
idvariable, replacing<ID>withpuppet_proxy_id# id=<ID> # echo $id -
Run the below script on the Satellite server:
foreman-rake console << RAKESCRIPT hosts=::Host.where(puppet_proxy_id: $id) hosts.each do |host| p "Updating puppet proxy for host: #{host.name}" host.update_attribute(:puppet_proxy_id, nil) host.update_attribute(:puppet_ca_proxy_id, nil) end; nil RAKESCRIPT
-
-
For more KB articles/solutions related to Red Hat Satellite 6.x Puppet Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Puppet Issues
For more KB articles/solutions related to Red Hat Satellite 6.x Client Subscription Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Client Subscription Issues
Root Cause
Despite Puppet configuration management having been disabled as per 1.8. Disabling Puppet Integration with Satellite in the Managing Configurations Using Puppet Integration in Red Hat Satellite guide, the profile for the host or capsule still lists a Puppet capsule and/or a Puppet capsule CA, and since these no longer are puppet enabled, re-registration of the host or capsule fails.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.