Bug 1745496

Summary: The "# satellite-maintain packages status" status should show as "Warning" instead of "ok", if the package version lock has been disabled
Product: Red Hat Satellite Reporter: Mihir Lele <mlele>
Component: Satellite MaintainAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: low Docs Contact:
Priority: low    
Version: 6.6.0CC: apatel, inecas, kgaikwad, mbacovsk
Target Milestone: 6.6.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman-maintain-0.4.8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:47:43 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 Mihir Lele 2019-08-26 08:56:03 UTC
Description of problem:

The status of "# satellite-maintain packages status" should show as "Warning" instead of "ok" if the package version lock is disabled

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

Additional info:


[root@satellite ~]# satellite-maintain packages unlock
Running preparation steps required to run the next scenarios
================================================================================
Check if tooling for package version locking is installed:            [OK]
--------------------------------------------------------------------------------


Running unlocking of package versions
================================================================================
Unlock versions of Foreman-related packages:                          [OK]
--------------------------------------------------------------------------------




[root@satellite ~]# satellite-maintain packages status
Running preparation steps required to run the next scenarios
===============================================================================
Check if tooling for package version locking is installed:            [OK]     
-------------------------------------------------------------------------------
-


The last line status should be "[warning]" since we have disabled the lock.

Comment 3 Martin Bacovsky 2019-08-28 20:10:37 UTC
Created redmine issue https://projects.theforeman.org/issues/27731 from this bug

Comment 4 Bryan Kearney 2019-09-05 16:05:17 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27731 has been resolved.

Comment 5 Nikhil Kathole 2019-09-10 09:59:20 UTC
Hi Mihir,

As per new changes, Warning message is displayed and status is OK. Does it look good?

Version tested:
Satellite 6.6.0 snap 19

# rpm -qa | grep maintain
rubygem-foreman_maintain-0.4.8-1.el7sat.noarch
satellite-maintain-0.0.1-1.el7sat.noarch

# satellite-maintain packages status
Running preparation steps required to run the next scenarios
================================================================================
Check if tooling for package locking is installed:                    [OK]
--------------------------------------------------------------------------------


Running detection of status of package version locking
================================================================================
Check status of version locking of packages: 
  Automatic locking of package versions is disabled in installer.
  Packages are not locked.
  WARNING: When locking is disabled there is a risk of unwanted update
  of Satellite' and its components and possible data inconsistency    [OK]
--------------------------------------------------------------------------------

Comment 6 Mihir Lele 2019-09-10 10:01:36 UTC
Hi Nikhil,

The warning looks ok, you can go ahead and close the bug.

regards,
Mihir

Comment 7 Nikhil Kathole 2019-09-10 10:02:40 UTC
Thanks Mihir for quick reply.

Moving to VERIFIED

Comment 8 Bryan Kearney 2019-10-22 19:47:43 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:3172