Description of problem: Puppet-related commands are still missing after the plugin was enabled. Version-Release number of selected component (if applicable): 7.0 snap 3 How reproducible: always Steps to Reproduce: 1. Have a fresh Satellite 2. Enable puppet plugin: # satellite-installer --enable-foreman-plugin-puppet \ --enable-foreman-cli-puppet \ --foreman-proxy-puppet true \ --foreman-proxy-puppetca true \ --foreman-proxy-content-puppet true \ --enable-puppet \ --puppet-server true \ --puppet-server-foreman-ssl-ca /etc/pki/katello/puppet/puppet_client_ca.crt \ --puppet-server-foreman-ssl-cert /etc/pki/katello/puppet/puppet_client.crt \ --puppet-server-foreman-ssl-key /etc/pki/katello/puppet/puppet_client.key 3. Try `hammer <cmd> --help` for one of these subcommands: puppet-environment puppet-class config-group host puppet-classes host sc-params hostgroup puppet-classes hostgroup sc-params Actual results: Error: No such sub-command 'puppet-environment'. Expected results: Subcommand was added and can be used. Additional info: Refreshing the hammer cache manually workarounds this issue: `hammer -r`
Upstream bug assigned to ofedoren
I guess the CLI packages should somehow invalidate the hammer cache. Oleh, any pointers how other hammer plugins solve this or whether they do?
Marek, hammer plugins don't do any cache invalidation. IIUC, RPM installation of Foreman plugins has post step which will re-cache the API documentation for Foreman, thus changing its checksum. This checksum is used in apipie-bindings to determine whether the local hammer's cache should be updated or not. I've seen that it does reload the cache automatically, but sometimes (I guess more often) it doesn't. The linked Redmine issue is more about to ensure we always reload the cache automatically, so there is no need to run hammer --reload-cache manually, which hopefully will solve such and similar issues described in this BZ.
Does the `hammer --reload-cache` help? We'd either need to add that to the installer or rpm post script. Or document that step.
Yes, `hammer -r` helps.
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/28283 has been resolved.
Verified in 6.11.0 snap 20 (tfm-rubygem-hammer_cli_foreman-3.1.0.1-1.el7sat.noarch) The commands get available after the plugin is enabled, just note there is some delay ~5-10 seconds after the installer finishes before the hammer cache is refreshed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5498