Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1298903

Summary: The schedule of an SCAP policy is not nest when added to parent host-group
Product: Red Hat Satellite Reporter: Harald Jensås <hjensas>
Component: SCAP PluginAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Shimon Shtein <sshtein>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.5CC: bkearney, gkonda, jcallaha, mhulan, sshtein
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Jensås 2016-01-15 12:03:48 UTC
Description of problem:
When creating a SCAP Policy and selecting the parent hostgroup of multiple nested host-groups the 'policy:' does not apply to hosts that are members of the nested groups.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Create 3 host groups

---|-------------|------------------|------------------|---------------------------------|------
ID | NAME        | TITLE            | OPERATING SYSTEM | ENVIRONMENT                     | MODEL
---|-------------|------------------|------------------|---------------------------------|------
1  | RHEL7Server | RHEL7Server      | RedHat 7.2       | KT_Example_ORG_Library_puppet_7 |      
5  | LNX         | RHEL7Server/LNX  |                  |                                 |      
4  | PROD        | RHEL7Server/PROD |                  |                                 |      
---|-------------|------------------|------------------|---------------------------------|------

2. Create an SCAP policy.
3. Assign the SCAP policy to the RHEL7Server host-group.

Actual results:
The policy does not apply correctly to a host in the nested groups LNX and PROD. The "policies:" become an unset array, instead of specifying policy ID and schedule. However the 'foreman_scap_client:' class is added.
---
classes:
  foreman_scap_client:
    policies: []
    port: '9090'
    server: sat61.lnx.example.com
parameters:
  puppetmaster: sat61.lnx.example.com
  hostgroup: RHEL7Server/LNX

Expected results:
The policy should apply correctly to hosts that are part of nested host-groups.

---
classes:
  foreman_scap_client:
    policies:
    - id: 1
      profile_id: xccdf_org.ssgproject.content_profile_common
      content_path: /var/lib/openscap/content/96e3704d2909a9f0956131e7254d2d3416ca9268f2d735e3f40a4353efa3c3e9.xml
      download_path: /compliance/policies/1/content
      minute: ! '*/10'
      hour: ! '*'
      monthday: ! '*'
      month: ! '*'
      weekday: ! '*'
    port: 9090
    server: sat61.lnx.example.com
parameters:
  puppetmaster: sat61.lnx.example.com
  hostgroup: RHEL7Server/LNX


Additional info:

Comment 1 Bryan Kearney 2016-07-26 19:06:42 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 3 Marek Hulan 2017-01-13 11:16:19 UTC
Created redmine issue http://projects.theforeman.org/issues/18066 from this bug

Comment 4 Marek Hulan 2017-01-13 11:22:48 UTC
Thanks for the report. We should add inheriting mechanism here too, so the policies from all parent host groups are merged into the policies list.

Comment 7 Satellite Program 2017-01-13 13:06:30 UTC
Upstream bug assigned to mhulan

Comment 8 Satellite Program 2017-01-13 13:06:33 UTC
Upstream bug assigned to mhulan

Comment 9 Satellite Program 2017-01-17 09:06:28 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18066 has been resolved.

Comment 10 Ondřej Pražák 2017-07-31 10:20:14 UTC
*** Bug 1474407 has been marked as a duplicate of this bug. ***

Comment 12 Bryan Kearney 2018-02-21 16:43:20 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.

https://access.redhat.com/errata/RHSA-2018:0336

Comment 13 Satellite Program 2018-02-21 16:51:07 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.
> 
> https://access.redhat.com/errata/RHSA-2018:0336