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 1301974 - Add support for selection in all commands where --select vg_uuid=<uuid> is suggested if multiple VGs found with the same name
Summary: Add support for selection in all commands where --select vg_uuid=<uuid> is su...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.0
Hardware: All
OS: Linux
medium
low
Target Milestone: pre-dev-freeze
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-26 13:15 UTC by Peter Rajnoha
Modified: 2021-09-03 12:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 07:39:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Rajnoha 2016-01-26 13:15:58 UTC
We need to add support for -S|--select for all commands where possible, mainly the ones which suggest --select use if multiple VGs are found with the same name.

For example, lvcreate is one of them:

[root@rhel6-a ~]# vgs -o+vg_uuid -S vg_name=vg
  VG   #PV #LV #SN Attr   VSize VFree VG UUID                               
  vg     1   1   0 wz--n- 4.00g 3.99g eHZp2F-7Qdk-p6br-Z8cI-iEwi-LWIl-ScaCr4
  vg     1   1   0 wz--n- 4.00g 3.99g GhDzAe-LAav-yhCu-WF4e-G1zn-FtrQ-yh15OP

[root@rhel6-a ~]# lvcreate -l1 vg
  Multiple VGs found with the same name: skipping vg
  Use the VG UUID with --select vg_uuid=<uuid>

[root@rhel6-a ~]# lvcreate -l1 -S vg_uuid=eHZp2F-7Qdk-p6br-Z8cI-iEwi-LWIl-ScaCr4
lvcreate: invalid option -- 'S'
  Error during parsing of command line.

However, in such cases, we need to make sure that the --select returns only one item that should be processed (one VG for the lvcreate example above). If the result of selection is a set which contains more items, we need to error out and suggest users to refine their selection so there's only one item coming as a result of the selection.

We should either fix this for 6.8 or we need to remove the "Use the VG UUID with --select vg_uuid=<uuid>" message for commands where --select is not yet supported.

Comment 1 David Teigland 2016-01-26 15:37:00 UTC
I was aware of the error message being inaccurate in a couple of cases like lvcreate, but I thought it was obscure enough to ignore.  To change this we simply need to check what the command is before printing the "use -S" suggestion (by looking at the command name or using a cmd flag to control the printing of this message.)

As for adding -S support to commands like lvcreate (that take a single VG)... as you point out, we need to ensure it selects only one VG.  That obviously reduces the usefulness and motivation for it.  It also includes some messy work in changing the arg processing to allow a missing VG arg (which can also sometimes be embedded into an LV name arg.)

Comment 5 RHEL Program Management 2020-12-15 07:39:50 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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