Bug 1759588

Summary: "foreman-maintain packages update" fails to update all packages
Product: Red Hat Satellite Reporter: Lukas Pramuk <lpramuk>
Component: Satellite MaintainAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: high    
Version: 6.6.0CC: apatel, egolov, inecas, kgaikwad, mawerner, mbacovsk, mmccune, mvanderw, spetrosi, zhunting
Target Milestone: 6.7.0Keywords: Triaged, UserExperience
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.5.2 Doc Type: Known Issue
Doc Text:
The `foreman-maintain packages update all` command does not work. To update all packages on the Satellite base operating system, enter the `foreman-maintain packages update \\*` command.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 12:58: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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1762651    

Description Lukas Pramuk 2019-10-08 14:54:01 UTC
Description of problem:
"foreman-maintain packages update" fails to update all packages with:

ERROR: parameter 'PACKAGES ...': no value provided

It should work similar way as "yum update" works. No parameter means all packages. 

Yet worse, there is explicit all packages for yum as "\*"
But for foreman-maintain it needs to be escaped twice "\\*"

Not obvious nor documented.


Version-Release number of selected component (if applicable):
@Satellite 6.6.0 Snap22
rubygem-foreman_maintain-0.4.9-1.el7sat.noarch


How reproducible:
deterministic

Steps to Reproduce:
1. # foreman-maintain packages update
ERROR: parameter 'PACKAGES ...': no value provided

See: 'foreman-maintain packages update --help'

Actual results:
"foreman-maintain packages update" dourly expects a parameter


Expected results:
"foreman-maintain packages update" treats no parameter the same way as "yum update" does

Additional info:
Undocumented workaround is 
# foreman-maintain packages update \\*

Comment 4 Martin Bacovsky 2019-10-21 12:42:18 UTC
Created redmine issue https://projects.theforeman.org/issues/28097 from this bug

Comment 7 Bryan Kearney 2020-02-12 17:05:47 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28097 has been resolved.

Comment 8 Lukas Pramuk 2020-03-04 15:14:48 UTC
VERIFIED.

@Satellite 6.7.0 Snap14
rubygem-foreman_maintain-0.5.2-1.el7sat.noarch

by following manual reproducer:

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


Running update packages in unlocked session
================================================================================
Confirm update all is intentional: 

WARNING: No specific packages to update were provided
so we are going to update all available packages.
It is recommended to update everything only as part of upgrade
of the Satellite to the next version. 
To Upgrade to next version use 'foreman-maintain upgrade'.

NOTE: --assumeyes is not applicable for this check

Do you want to proceed with update of everything regardless
of the recommendations?, [y(yes), q(quit)] y
                                                                      [OK]      
--------------------------------------------------------------------------------
...

>>> "foreman-maintain packages update" treats no parameter the same way as "yum update" does

Comment 11 errata-xmlrpc 2020-04-14 12:58: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/RHBA-2020:1442