Description of problem: The customer would like to be able to run a hammer command and add an OpenSCAP Capsule and/or a Compute Profile to a Host Group. These parameters are not currently available. Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create a host group (or use a created one) 2. Attempt to add either an OpenSCAP Capsule or a Compute Profile via hammer 3. Actual results: Not currently available Expected results: Addition of either OpenSCAP Capsule and/or Compute Profile to Host Group Additional info: n/a
Connecting redmine issue http://projects.theforeman.org/issues/20538 from this bug
The commands for OpenSCAP have been added as a part of #1374285, hooking up with upstream issue for compute profiles.
Upstream bug assigned to mshira
The openscap part has been implemented by BZ 1561796, compute profile commands have been merged in upstream in February but I didn't see the hostgroup assignment in the PR. Shira, do you know if assigning compute profile to hostgroup is now possible via hammer? I'm updating the BZ to reflect only the potentially missing part.
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/20538 has been resolved.
This seems to work in Hammer: `hammer hostgroup {create,update} --help` contains arguments --compute-profile and --compute-profile-id. Then, a newly created machine, upon selecting its hostgroup, indeed has parameters as specified in the compute profile. However: 1) I wasn't able to track which upstream issue introduced these changes 2) It is possible to select any compute profile. In WebUI, it is only possible to select a compute profile that has attributes for at least one compute resource (i.e. is not shown as "unspecified" when open through Infrastructure -> Compute Profiles -> <compute_profile>). Furthermore, when selecting a compute profile through Hammer that would be hidden in WebUI, that compute profile is then shown in WebUI when editing that (and only that!) hostgroup. 3) Note that it is possible to set compute profile through Hammer even without setting compute resource. During host creation in WebUI, the fields for values set in compute profile are only shown when a compute resource is selected. On the the other side, when editing a hostgroup in WebUI, it is also possible to set a compute profile without setting compute resource so this is probably expected behavior. I consider 2) a minor bug but am open to be proven otherwise.
After discussion with Shira, I decided to verify this BZ and report a separate BZ for issue 2) because it is an issue in API (which is used by Hammer and which also allows to select "unspecified" compute profile). Verified on Sat 6.7 snap 2.
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, 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-2020:1454