Bug 1127693

Summary: Cluster activation/deactivation switches not working as a user might expect (-aen/-aly specifically)
Product: Red Hat Enterprise Linux 6 Reporter: Nenad Peric <nperic>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
lvm2 sub component: Activating existing Logical Volumes (RHEL6) QA Contact: cluster-qe <cluster-qe>
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, prockai, zkabelac
Version: 6.6   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 11:17:13 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 Nenad Peric 2014-08-07 11:06:37 UTC
Description of problem:

There are actually two problems, encountered during verification of Bug #1020877

If the LV is locally activated on all cluster nodes with -aly, exlusive deactivation (-aen) equates to -an. That is perhaps not what a user would expect.

A second issue, is that if an LV is not allowed to be activated by filtering, the LV activation returns without any message and a return code of 0, but the LV does not get activated. 

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


How reproducible:


Steps to Reproduce:

1st issue:

 - activate LV on all nodes by -aly for example, and then try to exclusively deactivate on one of the nodes by -aen. It will deactivate the LV on all the nodes. 

2nd issue:

 - create a volume_list filter and try to activate an LV not specified by it. lvchange will silently ignore the activation request and not inform a user that the LV did not change the state. 

Actual results:


Expected results:

-aen should 'exclusively deactivate' an LV, meaning that an expected behaviour would, in the worst case, probably be that -aen == -aln and not -an. Since the lvchange accepts -aen as a command line argument, it would be logical that the user issuing it does not want the LV to be deactivated globally across all of the nodes.
 
Another option would be that LVM prints out a warning message if -aen was used on an LV which was not exclusively activated in the first place. Something like "There are no exclusively activated LVs to deactivate". 

Second issue could be solved by informing a user that an activation of an LV did NOT pass since it was blocked by filtering. I actually had a situation where LVs did not want to get activated, and I did not know why, since I forgot that I set the volume_list tag in lvm.conf. Would have saved me some debugging if LVM just told me that my LV cannot be activated on this node due to the filters I forgot I had set in lvm.conf.



Additional info:

Comment 2 Peter Rajnoha 2014-08-07 11:21:00 UTC
(In reply to Nenad Peric from comment #0)
> Expected results:
> 
> -aen should 'exclusively deactivate' an LV, meaning that an expected
...  
> Another option would be that LVM prints out a warning message if -aen was
> used on an LV which was not exclusively activated in the first place.
> Something like "There are no exclusively activated LVs to deactivate". 

I'd go with this option to fix the issue. Or there's a third option as well - to forbid "-aen" completely and just allow the common "-an" to deactivate the volume.

> 
> Second issue could be solved by informing a user that an activation of an LV
> did NOT pass since it was blocked by filtering. I actually had a situation
> where LVs did not want to get activated, and I did not know why, since I
> forgot that I set the volume_list tag in lvm.conf. Would have saved me some
> debugging if LVM just told me that my LV cannot be activated on this node
> due to the filters I forgot I had set in lvm.conf.
> 

And the same applies to non-clustered lvchange -ay in case the LV does not pass the volume_list - this is reported only in verbose output (lvchange -ay -v ...).
However, with clustered LVs, we don't even have this verbose output available for the lvchange command... So yes, we should improve messages here a bit.

Comment 3 Peter Rajnoha 2014-08-07 11:27:54 UTC
(In reply to Peter Rajnoha from comment #2)
> > 
> > Second issue could be solved by informing a user that an activation of an LV
> > did NOT pass since it was blocked by filtering. I actually had a situation
> > where LVs did not want to get activated, and I did not know why, since I
> > forgot that I set the volume_list tag in lvm.conf. Would have saved me some
> > debugging if LVM just told me that my LV cannot be activated on this node
> > due to the filters I forgot I had set in lvm.conf.
> > 
> 
> And the same applies to non-clustered lvchange -ay in case the LV does not
> pass the volume_list - this is reported only in verbose output (lvchange -ay
> -v ...).
> However, with clustered LVs, we don't even have this verbose output
> available for the lvchange command... So yes, we should improve messages
> here a bit.

(Related bug #1023063, though that one is for RHEL7 and lvcreate, but the nature of the problem is the same.)

Comment 6 Peter Rajnoha 2015-10-15 07:15:54 UTC
We haven't looked at this one yet at all, adding "Devel Conditional NAK Design".

Comment 8 Jan Kurik 2017-12-06 11:17:13 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/