Project

General

Profile

Actions

Bug #29786

closed

Make options for install and update commands consistent

Added by Vladimir Sedmik over 4 years ago. Updated 10 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

The foreman-maintain update and foreman-maintain install commands behave differently when --assumeyes option is provided at wrong position:

1) update will correctly fail:

# bin/foreman-maintain packages update httpd --assumeyes
ERROR: too many arguments

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

2) but install will run, ignoring the --assumeyes option:

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

Running install packages in unlocked session
================================================================================
Confirm installer run is allowed: 

WARNING: This script runs satellite-installer after the yum execution 
to ensure the Satellite is in a consistent state.
As a result some of your services may be restarted. 

Do you want to proceed?, [y(yes), q(quit)]

Both should fail (as in the first case) and should be non-interactive if the --assumeyes is provided at the right position:

# bin/foreman-maintain packages install --help
Usage:
    foreman-maintain packages install [OPTIONS] PACKAGES ...

Parameters:
    PACKAGES ...                 packages to install

Options:
    -y, --assumeyes              Automatically answer yes for all questions
    -w, --whitelist whitelist    Comma-separated list of labels of steps to be skipped
    -f, --force                  Force steps that would be skipped as they were already run
    -h, --help                   print help

Actions #1

Updated by Suraj Patil over 4 years ago

Please try to pass the option "--assumeyes" before the package name.

As it is described in the command usage, [OPTIONS] should come before PACKAGES.

# bin/foreman-maintain packages install --help
Usage:
    foreman-maintain packages install [OPTIONS] PACKAGES ...
Actions #2

Updated by Vladimir Sedmik over 4 years ago

Suraj Patil wrote:

Please try to pass the option "--assumeyes" before the package name.

As it is described in the command usage, [OPTIONS] should come before PACKAGES.

[...]

Yes, when the option is on the right position, it works. This issue was meant that in case 2) it should behave the same (show an error) as in case 1).

Actions #3

Updated by Eric Helms 10 months ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF