Bug 2040241

Summary: Running smart-proxy-openscap-send command returns "Gemfile lists the gem rsec (< 1) more than once" on Satellite 6.10.
Product: Red Hat Satellite Reporter: Akshay Kapse <akapse>
Component: SCAP PluginAssignee: Ewoud Kohl van Wijngaarden <ekohlvan>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.1CC: alsouza, avnkumar, casl, egolov, ekohlvan, mhulan, momran, osousa
Target Milestone: 6.11.1Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-proxy-3.1.1.2-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2093411 2106090 (view as bug list) Environment:
Last Closed: 2022-07-27 17:27:09 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 Akshay Kapse 2022-01-13 09:51:51 UTC
Description of problem:
1) Running smart-proxy-openscap-send generates below logs:
~~~
Your Gemfile lists the gem rsec (< 1) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
~~~

and when configured email notifications, same are flooded with email every 30 minutes.

2) Cronjob trigerring this :
# cat /etc/cron.d/tfm-rubygem-smart_proxy_openscap 
*/30 * * * * foreman-proxy smart-proxy-openscap-send >> /var/log/foreman-proxy/cron.log

3) The logfile /var/log/foreman-proxy/cron.log is empty

This doesn't seems to be error but causing unnecessary email notifications every 30 minutes.

Version-Release number of selected component (if applicable):
- tfm-rubygem-smart_proxy_openscap-0.9.1-1.el7sat.noarch

How reproducible:
- Easily 

Steps to Reproduce:
1. Execute smart-proxy-openscap-send on Satellite 6.10
2. Or configure mail notifications for openscap and check the emails.

Actual results:
~~~
Your Gemfile lists the gem rsec (< 1) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
~~~

Expected results:
- Should not show logs while executing this command which will stop it getting on email notifications.
- Logs should get captured in /var/log/foreman-proxy/cron.log file.

Comment 1 Charles Slivkoff 2022-02-17 16:27:40 UTC
Version 6.10.2 also

Comment 3 Bryan Kearney 2022-03-10 16:04:58 UTC
Upstream bug assigned to ekohlvan

Comment 4 Bryan Kearney 2022-03-10 16:05:01 UTC
Upstream bug assigned to ekohlvan

Comment 5 Bryan Kearney 2022-03-10 20:04:59 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34589 has been resolved.

Comment 7 Evgeni Golov 2022-04-21 14:19:40 UTC
This is fixed in 6.11+ via https://github.com/theforeman/smart-proxy/commit/09bf77d9fbc3c9572f4aaeff2847136dd34aeb89, which silences the warnings, even if the root cause isn't fixed yet (as done in https://projects.theforeman.org/issues/34589)

If anyone needs a workaround, they can apply either https://github.com/theforeman/smart-proxy/commit/09bf77d9fbc3c9572f4aaeff2847136dd34aeb89 or https://github.com/theforeman/smart-proxy/commit/4133c302345eeb164f4b1c30524ac6623aa595e0 and you'll be fine (until the next foreman-proxy update, obviously)

I'd mark this BZ as fixed in foreman-proxy-3.1.0 (6.11+) and then we can see if it gets officially backported to 6.10 at some point

Comment 12 Jameer Pathan 2022-07-19 07:25:33 UTC
Verified:

Verified with:
- Satellite 6.11.1 snap 2

Test steps:
- Run smart-proxy-openscap-send on Satellite 6.11.1 snap 2

Observations:
- No logs were shown while executing smart-proxy-openscap-send

Comment 17 errata-xmlrpc 2022-07-27 17:27:09 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 (Satellite 6.11.1 Async Bug Fix Update), 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/RHBA-2022:5742