Bug 1561796 - [RFE] Add Hammer options for Host Groups to add Compute Profile
Summary: [RFE] Add Hammer options for Host Groups to add Compute Profile
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources
Version: 6.2.14
Hardware: All
OS: Linux
medium vote
Target Milestone: 6.7.0
Assignee: Shira Maximov
QA Contact: Lukáš Hellebrandt
Depends On:
TreeView+ depends on / blocked
Reported: 2018-03-29 00:01 UTC by patalber
Modified: 2021-06-10 15:41 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-14 13:22:58 UTC
Target Upstream Version:
mshira: needinfo-

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20538 0 Normal Resolved Commands for creating, updating and deleting compute profiles and attributes 2020-02-11 11:57:12 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:23:14 UTC

Description patalber 2018-03-29 00:01:02 UTC
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

Actual results:
Not currently available

Expected results:
Addition of either OpenSCAP Capsule and/or Compute Profile to Host Group

Additional info:

Comment 1 Ondřej Pražák 2018-09-24 13:51:22 UTC
Connecting redmine issue http://projects.theforeman.org/issues/20538 from this bug

Comment 2 Ondřej Pražák 2018-09-24 13:53:54 UTC
The commands for OpenSCAP have been added as a part of #1374285, hooking up with upstream issue for compute profiles.

Comment 3 Satellite Program 2018-09-24 14:01:42 UTC
Upstream bug assigned to mshira@redhat.com

Comment 4 Satellite Program 2018-09-24 14:01:47 UTC
Upstream bug assigned to mshira@redhat.com

Comment 9 Marek Hulan 2019-10-21 07:19:49 UTC
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.

Comment 11 Bryan Kearney 2019-11-05 20:59:44 UTC
Upstream bug assigned to mshira@redhat.com

Comment 12 Bryan Kearney 2019-11-05 20:59:46 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/20538 has been resolved.

Comment 14 Lukáš Hellebrandt 2019-11-26 14:54:01 UTC
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.

Comment 15 Lukáš Hellebrandt 2019-11-27 11:00:37 UTC
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.

Comment 18 errata-xmlrpc 2020-04-14 13:22:58 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.