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 1770430 - Internal Server Error while creating scap policy using hammer
Summary: Internal Server Error while creating scap policy using hammer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.7.0
Assignee: Ondřej Pražák
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-09 04:26 UTC by Nikhil Kathole
Modified: 2020-04-14 13:26 UTC (History)
2 users (show)

Fixed In Version: tfm-rubygem-foreman_openscap-2.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:26:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28262 0 Normal Closed Internal Server Error while creating scap policy using hammer 2021-02-11 10:13:11 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:26:33 UTC

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


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