Bug 208976

Summary: better error needed when volume can't be locked exclusively
Product: [Retired] Red Hat Cluster Suite Reporter: Corey Marthaler <cmarthal>
Component: lvm2-clusterAssignee: Christine Caulfield <ccaulfie>
Status: CLOSED CURRENTRELEASE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: agk, dwysocha, jbrassow, mbroz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHEL4.5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-14 06:19:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2006-10-02 20:09:50 UTC
Description of problem:
This is one of those many clvm errors which could be made more meaningful.
I took out an exclusive lock on a vg on link-08, I then attempted to take out
the same lock in link-02. The lock was unable to be taking out (as expected) but
the error I got didn't mention that there was already a lock out on that volume
on link-08. Instead I just saw the generic "Error locking on node" error.

[root@link-01 ~]# lvscan
  inactive          '/dev/vg/lv' [12.00 MB] inherit
[root@link-02 ~]# lvscan
  inactive          '/dev/vg/lv' [12.00 MB] inherit
[root@link-08 ~]# vgchange -aey
  1 logical volume(s) in volume group "vg" now active
[root@link-08 ~]# lvscan
  ACTIVE            '/dev/vg/lv' [12.00 MB] inherit

[root@link-02 ~]# vgchange -aey
  Error locking on node link-02: Resource temporarily unavailable
  0 logical volume(s) in volume group "vg" now active

It would be nice to see something more like:
"Error locking on node link-02: Resource already locked exclusively on link-08"

Comment 1 Christine Caulfield 2006-10-05 13:57:52 UTC
clvmd now passes sensible error messages back to the user. You won't get just
what you want (above) because clvmd doesn't know what node has the device locked
exclusively (we need DLM query for that, and it doesn't exist in RHEL5 yet), but
it is a better message.

Checking in WHATS_NEW;
/cvs/lvm2/LVM2/WHATS_NEW,v  <--  WHATS_NEW
new revision: 1.452; previous revision: 1.451
done
Checking in daemons/clvmd/clvmd-command.c;
/cvs/lvm2/LVM2/daemons/clvmd/clvmd-command.c,v  <--  clvmd-command.c
new revision: 1.10; previous revision: 1.9
done
Checking in daemons/clvmd/clvmd.c;
/cvs/lvm2/LVM2/daemons/clvmd/clvmd.c,v  <--  clvmd.c
new revision: 1.28; previous revision: 1.27
done
Checking in daemons/clvmd/lvm-functions.c;
/cvs/lvm2/LVM2/daemons/clvmd/lvm-functions.c,v  <--  lvm-functions.c
new revision: 1.23; previous revision: 1.22
done
Checking in daemons/clvmd/lvm-functions.h;
/cvs/lvm2/LVM2/daemons/clvmd/lvm-functions.h,v  <--  lvm-functions.h
new revision: 1.4; previous revision: 1.3
done


Comment 2 Corey Marthaler 2006-11-01 18:12:44 UTC
fix verified in lvm2-2.02.13-1/lvm2-cluster-2.02.13-1. marking verified, even
though this is really just a dup of bz 162809.