Bug 1770430

Summary: Internal Server Error while creating scap policy using hammer
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: SCAP PluginAssignee: Ondřej Pražák <oprazak>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: mhulan, oprazak
Target Milestone: 6.7.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_openscap-2.0.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:26:24 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 Nikhil Kathole 2019-11-09 04:26:57 UTC
Description of problem:

hammer -u admin -p changeme policy create --name='RHEL 7 policy' --organization-ids "1" --location-ids "2" --period='weekly' --weekday='monday' --scap-content-id="4" --scap-content-profile-id="24" --deploy-by puppet
Could not create the policy:
  Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.


Version-Release number of selected component (if applicable):
Satellite 6.7 snap 1


How reproducible: always


Steps to Reproduce:
[root@sgi-uv20-01 ~]# hammer scap-content info --id 4
Id:                    4
Title:                 Red Hat rhel7 default content
Created at:            2019-11-08 20:24:24 UTC
Original filename:     ssg-rhel7-ds.xml
SCAP content profiles: 
    Id:         16
    Profile id: xccdf_org.ssgproject.content_profile_stig-rhel7-disa
    Title:      DISA STIG for Red Hat Enterprise Linux 7
    Id:         17
    Profile id: xccdf_org.ssgproject.content_profile_ospp
    Title:      United States Government Configuration Baseline
    Id:         18
    Profile id: xccdf_org.ssgproject.content_profile_pci-dss
    Title:      PCI-DSS v3.2.1 Control Baseline for Red Hat Enterprise Linux 7
    Id:         19
    Profile id: xccdf_org.ssgproject.content_profile_rht-ccp
    Title:      Red Hat Corporate Profile for Certified Cloud Providers (RH CCP)
    Id:         20
    Profile id: xccdf_org.ssgproject.content_profile_C2S
    Title:      C2S for Red Hat Enterprise Linux 7
    Id:         21
    Profile id: xccdf_org.ssgproject.content_profile_ospp42
    Title:      OSPP - Protection Profile for General Purpose Operating Systems v. 4.2
    Id:         22
    Profile id: xccdf_org.ssgproject.content_profile_cjis
    Title:      Criminal Justice Information Services (CJIS) Security Policy
    Id:         23
    Profile id: xccdf_org.ssgproject.content_profile_standard
    Title:      Standard System Security Profile for Red Hat Enterprise Linux 7
    Id:         24
    Profile id: xccdf_org.ssgproject.content_profile_rhelh-vpp
    Title:      VPP - Protection Profile for Virtualization v. 1.0 for Red Hat Enterprise Linux Hypervisor (RHELH)
    Id:         25
    Profile id: xccdf_org.ssgproject.content_profile_hipaa
    Title:      Health Insurance Portability and Accountability Act (HIPAA)
    Id:         26
    Profile id: xccdf_org.ssgproject.content_profile_nist-800-171-cui
    Title:      Unclassified Information in Non-federal Information Systems and Organizations (NIST 800-171)
Locations:             
    Default Location
Organizations:         
    Default Organization

[root@sgi-uv20-01 ~]# hammer -u admin -p changeme policy create --name='RHEL 7 policy' --organization-ids "1" --location-ids "2" --period='weekly' --weekday='monday' --scap-content-id="4" --scap-content-profile-id="24" --deploy-by puppet
Could not create the policy:
  Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.


Actual results:
Could not create the policy:
  Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.


Expected results:
Should be created successfully.


Additional info:
Creating via UI works.

Comment 5 Ondřej Pražák 2019-11-14 07:41:27 UTC
Created redmine issue https://projects.theforeman.org/issues/28262 from this bug

Comment 6 Bryan Kearney 2019-11-14 09:01:46 UTC
Upstream bug assigned to oprazak

Comment 7 Bryan Kearney 2019-11-14 09:01:48 UTC
Upstream bug assigned to oprazak

Comment 8 Bryan Kearney 2019-11-15 11:01:42 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28262 has been resolved.

Comment 9 Nikhil Kathole 2019-11-22 17:31:14 UTC
VERIFIED

Version tested:
Satellite 6.7 snap 3

# hammer -u admin -p changeme policy create --name='RHEL policy' --organization-ids "1" --location-ids "2" --period='weekly' --weekday='monday' --scap-content-id="4" --scap-content-profile-id="24" --deploy-by puppet
Policy created

Comment 12 errata-xmlrpc 2020-04-14 13:26:24 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-2020:1454