Bug 1489252

Summary: [RFE] Add a note to ignore "WARNING" message when foreman_scap_client command executed manually
Product: Red Hat Satellite Reporter: dgupte
Component: SCAP PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.10CC: adahms, akarimi, dgupte, egolov, fabian.seelbach, mhulan, oprazak, sbream, sjagtap, swadeley
Target Milestone: 6.5.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: puppet-foreman_scap_client-0.3.19 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:36:36 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:

Comment 1 Andrew Dahms 2017-09-07 12:34:34 UTC
Assigning to Sergei for review.

Comment 6 Steve Bream 2017-09-12 17:37:39 UTC
Hello Sergei,

I agree - I don't think it makes sense to add this note to the documentation, as it tells customers that they can ignore a warning they generate by doing something that we don't just not tell them how to do, but tell them (in the comments of the cron job) that they shouldn't do.

I'm guessing that customers learn how to run the command manually by looking into the cron job, so I suggest that we put the warning there, along the lines of:
-------
$ crontab -l
# HEADER: This file was autogenerated at 2017-01-09 07:56:17 +0000 by puppet.
# HEADER: While it can still be managed manually, it is definitely not recommended.
# HEADER: Manually executing foreman_scap_client manually will generate errors
due to reference to missing files.
# HEADER: If you have run foreman_scap_client manually you can safely ignore errors due to missing http://www.redhat.com/security/data/oval/Red_Hat_Enterprise_Linux_7.xml. 
# HEADER: Note particularly that the comments starting with 'Puppet Name' should
# HEADER: not be deleted, as doing so could cause duplicate cron jobs.
# Puppet Name: foreman_scap_client_1
0 1 * * 1 /usr/bin/foreman_scap_client 1
-------

Comment 7 Stephen Wadeley 2017-09-13 07:37:30 UTC
Thank you Steve for comment 6

I see only one Sat6 scap component in bugzilla. Reassigning this bug to "Scap Plugin" as I do not know who owns the foreman_scap_client script.


Thank you

Comment 9 Ondřej Pražák 2017-10-19 08:21:03 UTC
Created redmine issue http://projects.theforeman.org/issues/21389 from this bug

Comment 10 pm-sat@redhat.com 2018-01-04 11:28:58 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21389 has been resolved.

Comment 14 Sanket Jagtap 2018-09-12 12:15:46 UTC
build :Satellite 6.4.0 snap21


Unable find the warning, maybe it missed the snap

Comment 17 Sanket Jagtap 2018-12-20 10:38:15 UTC
Build: Satellite 6.5.0 snap8 


The scap cron file has the required warning

# DO NOT EDIT THIS FILE MANUALLY
# IT IS MANAGED BY PUPPET
# ANY MANUAL CHANGES WILL BE LOST ON THE NEXT PUPPET RUN
#
# Executing foreman_scap_client from command line may be useful for debugging purposes.
# It may generate warnings due to a reference to a missing file.

# foreman_scap_client cron job

# Runs foreman_scap_client 1
0 1 * * 4 root /bin/sleep 165 ; /usr/bin/foreman_scap_client 1 2>&1 | logger -t foreman_scap_client

Comment 20 errata-xmlrpc 2019-05-14 12:36:36 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-2019:1222