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 1191724 - vgchange returns success when exclusive activation fails
Summary: vgchange returns success when exclusive activation fails
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.1
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 677817
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-11 20:12 UTC by Corey Marthaler
Modified: 2023-03-08 07:27 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 677817
Environment:
Last Closed: 2015-02-13 00:01:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1196580 0 unspecified CLOSED [RFE] Add local exclusive activation to vgchange (-aeyl) 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1196585 0 unspecified CLOSED [RFE] Add local exclusive activation to vgchange (-aeyl) 2021-09-08 20:25:10 UTC

Internal Links: 1196580 1196585

Comment 1 Corey Marthaler 2015-02-11 20:16:29 UTC
Looks like this was never fixed in RHEL7.

[root@host-119 ~]# vgchange -aye linear_1_3782
  1 logical volume(s) in volume group "linear_1_3782" now active
[root@host-119 ~]# lvs -a -o +devices
  LV             VG            Attr       LSize   Devices       
  linear_1_37820 linear_1_3782 -wima----- 336.00m /dev/sdb1(0)  


[root@host-123 ~]# vgchange -aye linear_1_3782
  Error locking on node 3: Volume is busy on another node
  0 logical volume(s) in volume group "linear_1_3782" now active
[root@host-123 ~]# echo $?
0
[root@host-123 ~]# lvs -a -o +devices
  LV             VG            Attr       LSize   Devices       
  linear_1_37820 linear_1_3782 -wim------ 336.00m /dev/sdb1(0)  



3.10.0-229.el7.x86_64
lvm2-2.02.115-3.el7    BUILT: Wed Jan 28 09:59:01 CST 2015
lvm2-libs-2.02.115-3.el7    BUILT: Wed Jan 28 09:59:01 CST 2015
lvm2-cluster-2.02.115-3.el7    BUILT: Wed Jan 28 09:59:01 CST 2015
device-mapper-1.02.93-3.el7    BUILT: Wed Jan 28 09:59:01 CST 2015
device-mapper-libs-1.02.93-3.el7    BUILT: Wed Jan 28 09:59:01 CST 2015
device-mapper-event-1.02.93-3.el7    BUILT: Wed Jan 28 09:59:01 CST 2015
device-mapper-event-libs-1.02.93-3.el7    BUILT: Wed Jan 28 09:59:01 CST 2015
device-mapper-persistent-data-0.4.1-2.el7    BUILT: Wed Nov 12 12:39:46 CST 2014
cmirror-2.02.115-3.el7    BUILT: Wed Jan 28 09:59:01 CST 2015

Comment 5 Corey Marthaler 2015-02-11 21:20:28 UTC
This existed in 7.0 as well.

Comment 6 Zdenek Kabelac 2015-02-11 21:48:12 UTC
I don't think there is a bug.

When you want to 'exclusively' activate LV - it will get activated this way on any cluster node.

So it's just like when you want to activate already active LV.

So if in the past repeated exclusive activation of already active LV reported error - it was a bug which has been fixed.

The 'return code' reflects the actual state - and if the actual state is 'exclusively active LV' - it's then correctly returning 0.

Comment 7 Corey Marthaler 2015-02-12 21:00:09 UTC
Asking to activate an already activate local volume is different. There, in the end, you get exactly what you asked for even if the cmd didn't actually need to do anything since it was already in the state you requested.

Here, you are requesting the exclusive activation of that volume, on that specific machine in the cluster. This command not only produces locking errors, but the result is that volume *not* being exclusively activated on that specific machine (since it's already exclusively active on a different cluster machine). The command was unable to do what you requested.

Comment 8 Corey Marthaler 2015-02-12 21:08:55 UTC
I may have to stand corrected. From the lvchange man page: "If clustered locking is enabled, -aey will activate exclusively on *one* node..."

I would argue that running -aye on nodeA implies that you are requesting it be exclusively active on nodeA, but that is not what is technically guaranteed by the man page.

I still argue that a non zero return is more helpful to the user, but feel free to close this bug.

Comment 9 Zdenek Kabelac 2015-02-12 21:21:34 UTC
Yep - we technically do not have 'local exclusive' activation command available.

Normally 'exclusive' activation prefers 'local' node, but it's not a rule and could be further controlled by filters and tags.

I admit it's quite complicated and likely not very used in its full capability.

New  'sanlock' will be far less complex here.

Comment 10 Corey Marthaler 2015-02-13 00:01:23 UTC
At least it's not 'lvchange -aly' allowing the same LV to be active locally on multiple machines in the cluster. :)

Comment 11 Zdenek Kabelac 2015-02-13 13:03:58 UTC
What could be a bug/issue here is the  'Error' locking message which may look confusing, it should rather state something about LV being already exclusively active on another node.

Test has to also fail, if the LV is active non-exclusively on any of cluster nodes.

Probably for BZ completeness it's worth to mention:
http://people.redhat.com/agk/talks/CLVM-UKUUG2007/


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