RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1508544 - vdo cli allows all options for all commands
Summary: vdo cli allows all options for all commands
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: vdo
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Joe Shimkus
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-01 16:01 UTC by Jakub Krysl
Modified: 2019-03-06 01:11 UTC (History)
5 users (show)

Fixed In Version: 6.1.0.75
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:46:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0871 0 None None None 2018-04-10 15:47:21 UTC

Description Jakub Krysl 2017-11-01 16:01:33 UTC
Description of problem:
VDO manpage and help allow only certain options for certain commands. For example "vdo start" has only single command specific option "--forceRebuild". But there is no warning/error when any other options are used and the command succeeds. So for example this is allowed:
# vdo start --name vdo --writePolicy "async"
The write policy option is completely ignored, so the command is exactly the same as
# vdo start --name vdo

I could not find a single command that would produced warning like "Option X not allowed for command Y"

Note: The reasoning behind this bug is to avoid confusion on user side: "I used the option but it does not work!"

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

How reproducible:
100%

Steps to Reproduce:
1. Check vdo manpage / vdo --help
2. Run command with options that should not be allowed

Actual results:
Command runs successfully ignoring options that are not allowed

Expected results:
Warning used option is not allowed for used command

Additional info:

Comment 4 Joe Shimkus 2017-12-04 17:25:35 UTC
Note that the resolution to this issue involves the discussed switch to using python's argparse library and, as such, changes the operation of the vdo command so that the operation to perform must be the first thing specified; e.g.,

> vdo list --verbose

and not:

> vdo --verbose list

Comment 5 Louis Imershein 2017-12-05 22:37:19 UTC
I will note that this is generally the way we document the commands to behave anyway.  If we were saying it was flipping to the opposite behavior, i would be far more concerned!

Comment 7 Joe Shimkus 2017-12-11 17:04:36 UTC
There are some python exceptions raised during option checking that end up resulting in a python stack trace.  This has been corrected in a subsequent change and will be included in 6.1.0.95 or later.

Comment 8 Jakub Krysl 2017-12-15 13:26:24 UTC
Now if the vdo is given invalid option otherwise valid with other command, this option is not allowed anymore:

# vdo start --name vdo --writePolicy=sync
usage: vdo [-h]

           {activate,changeWritePolicy,create,deactivate,disableCompression,disableDeduplication,enableCompression,enableDeduplication,growLogical,growPhysical,list,modify,printConfigFile,remove,start,status,stop}
           ...
vdo: error: unrecognized arguments: --writePolicy=sync

The listing of commands is subject of another BZ 1525560 and is already getting fixed.

Comment 11 errata-xmlrpc 2018-04-10 15:46:34 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/RHEA-2018:0871


Note You need to log in before you can comment on or make changes to this bug.