Bug 1370002 - vgchange --addtag completes without error but queried tag value does not match
Summary: vgchange --addtag completes without error but queried tag value does not match
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: LVM and device-mapper development team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-25 03:14 UTC by Tony Asleson
Modified: 2016-08-26 20:41 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-26 14:38:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tony Asleson 2016-08-25 03:14:06 UTC
Description of problem:

# vgchange test --addtag "--h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy-=j649x:+dUcYWPEo6.IWT0c"
  Volume group "test" successfully changed
[root@localhost dbus]# vgs -o+tags
  VG   #PV #LV #SN Attr   VSize  VFree  VG Tags                                                 
  test   1   0   0 wz--n- 16.00g 16.00g --h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy=j649x:+dUcYWPEo6.IWT0c


The tags do not match
--h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy-=j649x:+dUcYWPEo6.IWT0c
--h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy=j649x:+dUcYWPEo6.IWT0c

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

F24 & Rawhide both exhibit same behavior

How reproducible:
100%

Steps to Reproduce:
See problem description

Actual results:
Tag added != tag retrieved

Expected results:
Tag added == tag retrieved

Additional info:

Comment 1 David Teigland 2016-08-26 14:19:53 UTC
any argv lvm sees that starts with -- is de-hypenated before matching with known options, so the '-' in the middle is removed.

Comment 2 Zdenek Kabelac 2016-08-26 14:27:54 UTC
so we surely need to 'dehyphen' only options - not their args.

Comment 3 David Teigland 2016-08-26 14:38:49 UTC
when using unusual tag names like this, either one of the following forms would work:

--addtag=--h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy-=j649x:+dUcYWPEo6.IWT0c
--addtag @--h/K.6g0A4FOEatf3+k_nI/Yp&L_u2oy-=j649x:+dUcYWPEo6.IWT0c

Comment 4 Alasdair Kergon 2016-08-26 20:35:19 UTC
(In reply to Zdenek Kabelac from comment #2)
> so we surely need to 'dehyphen' only options - not their args.

That's hard.  There are some easy improvements we could make though, like not touching items that don't have the right characteristics to be arguments.

Comment 5 Zdenek Kabelac 2016-08-26 20:41:45 UTC
We should just keep args in both forms hyphened and de-hyphened - and use the right one for option and for its arg


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