Bug 1023072

Summary: clvmd fails with tag based activation with error 'verify_message bad flags 8'
Product: Red Hat Enterprise Linux 6 Reporter: Zdenek Kabelac <zkabelac>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: high    
Version: 6.5CC: agk, cmarthal, dwysocha, heinzm, jbrassow, msnitzer, prajnoha, prockai, teigland, thornber, tlavigne, zkabelac
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.100-8.el6 Doc Type: Bug Fix
Doc Text:
No doc needed. This is internal bug in between releases.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 23:29:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zdenek Kabelac 2013-10-24 14:46:25 UTC
Description of problem:

Verification code in the clvmd rejects message with CLVMD_FLAG_REMOTE set as an invalid message. This bit is used for processing on other then local nodes.

'verify_message' function in clvmd.c doesn't include this flag as valid,
and reject messages with this bit set as invalid.

This makes tag based activation unusable since the activation on remote nodes doesn't work.

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Alasdair Kergon 2013-10-29 14:45:17 UTC
activate_lv_excl() uses this through activate_lv_excl_remote().

To reproduce, set up the patterns in activation/volume_list in lvm.conf on each node such that only one node matches a particular LV, then run lvchange -aey from a different node from the one that matches.

Comment 5 Peter Rajnoha 2013-10-29 15:13:55 UTC
For example, I have three nodes with this volume_list setting in lvm.conf (just an example):

 node-b: volume_list = [ "@other_tag" ]
 node-c: volume_list = [ "@my_tag" ]
 node-d: volume_list = [ "@my_tag" ]

I'm having an LV with my_tag assigned.

Then calling the exclusive activation from node-b (where the "other_tag" is defined"):

[root@rhel6-b ~]# lvchange -aey @my_tag
  EOF reading CLVMD
  Error writing data to clvmd: Broken pipe
  Error writing data to clvmd: Broken pipe
  Error writing data to clvmd: Broken pipe

While with the fix, it should be passing (with no LVs activated as it doesn't match locally and we require exclusive activation).

Comment 6 Peter Rajnoha 2013-10-29 15:39:40 UTC
(In reply to Peter Rajnoha from comment #5)
> While with the fix, it should be passing (with no LVs activated as it
> doesn't match locally and we require exclusive activation).

Sorry, with the LV activated on exactly one *remote* node exclusively (the first one where the message gets first).

Comment 7 Alasdair Kergon 2013-10-29 16:11:06 UTC
(In reply to Peter Rajnoha from comment #6)
> Sorry, with the LV activated on exactly one *remote* node exclusively (the
> first one where the message gets first).

And if two or more remote nodes match, exactly *one* of them - selected at random - will activate it exclusively successfully, and the other nodes will also try but return errors ("Volume is busy on another node"), which is expected behaviour.

Comment 9 Corey Marthaler 2013-10-30 21:33:58 UTC
Fix verified in the latest rpms.


2.6.32-410.el6.x86_64
lvm2-2.02.100-8.el6    BUILT: Wed Oct 30 03:10:56 CDT 2013
lvm2-libs-2.02.100-8.el6    BUILT: Wed Oct 30 03:10:56 CDT 2013
lvm2-cluster-2.02.100-8.el6    BUILT: Wed Oct 30 03:10:56 CDT 2013
udev-147-2.50.el6    BUILT: Fri Oct 11 05:58:10 CDT 2013
device-mapper-1.02.79-8.el6    BUILT: Wed Oct 30 03:10:56 CDT 2013
device-mapper-libs-1.02.79-8.el6    BUILT: Wed Oct 30 03:10:56 CDT 2013
device-mapper-event-1.02.79-8.el6    BUILT: Wed Oct 30 03:10:56 CDT 2013
device-mapper-event-libs-1.02.79-8.el6    BUILT: Wed Oct 30 03:10:56 CDT 2013
cmirror-2.02.100-8.el6    BUILT: Wed Oct 30 03:10:56 CDT 2013



BEFORE FIX:
[root@taft-02 ~]# vgs -a -o +vg_tags
  VG        #PV #LV #SN Attr   VSize   VFree   VG Tags
  TAFT        7   1   0 wz--nc 949.65g 949.55g taft-01
[root@taft-02 ~]# lvchange -aey @taft-01
  EOF reading CLVMD
  Error writing data to clvmd: Broken pipe
  Error writing data to clvmd: Broken pipe
  Error writing data to clvmd: Broken pipe


AFTER FIX:
[root@taft-02 ~]# lvchange -aey @taft-01
[root@taft-02 ~]# lvs -a -o +devices
  LV      VG        Attr       LSize   Devices                  
  stripe  TAFT      -wi------- 104.00m /dev/sdb1(0),/dev/sdc1(0)

Oct 30 16:30:11 taft-02 lvm[1932]: Found volume group "TAFT"
Oct 30 16:30:11 taft-02 lvm[1932]: activation/volume_list configuration setting defined: Checking the list to match TAFT/stripe
Oct 30 16:30:11 taft-02 lvm[1932]: No item supplied in activation/volume_list configuration setting matches TAFT/stripe
Oct 30 16:30:11 taft-02 lvm[1932]: Not activating TAFT/stripe since it does not pass activation filter.

Comment 10 errata-xmlrpc 2013-11-21 23:29:53 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.

http://rhn.redhat.com/errata/RHBA-2013-1704.html