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 1213735 - lvmconf is missing command line check for switching the config to clustered mode
Summary: lvmconf is missing command line check for switching the config to clustered mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Peter Rajnoha
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-21 07:55 UTC by Nenad Peric
Modified: 2016-05-11 01:16 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.02.140-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-11 01:16:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0964 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2016-05-10 22:57:40 UTC

Description Nenad Peric 2015-04-21 07:55:42 UTC
Description of problem:

lvmconf can be used to automatically set the lvm.conf and the required services up for installation / configuration of a clustered environment. However, when using the normal (not ha-lvm) options, there are two problems present. 
The check for validity of used options is missing, and the setting of the locking_type is wrong in some cases. 


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

lvm2-2.02.118-2.el6.x86_64

How reproducible:
Everytime

Steps to Reproduce:

[root@tardis-02 ~]# lvmconf  --services --lockinglibdir /root
[root@tardis-02 ~]# echo $?
0

Actual results:

The command succeeds. 
Additionally if the prerequisite options ARE provided, the locking_type is set to 3 (as in default settings), instead to 2 which would be if --lockinglibdir is provided.

Expected results:

Do not allow the usage of sub-arguments of --enable-cluster on their own. 
Make sure that the correct locking type is used in all cases. 

Additional info:

Comment 2 Peter Rajnoha 2015-09-22 11:36:54 UTC
(In reply to Nenad Peric from comment #0)
> Additionally if the prerequisite options ARE provided, the locking_type is
> set to 3 (as in default settings), instead to 2 which would be if
> --lockinglibdir is provided.
> 

Fixed with https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=001f747963d66e4cff8e827afb710961193b9f03.


> Do not allow the usage of sub-arguments of --enable-cluster on their own. 
> Make sure that the correct locking type is used in all cases. 

Actually, the --lockinglibdir as well as --lockinglib argument is allowed to be used with the --enable-cluster or not. I won't change this as it's already released this way.

# lvmconf --help
Usage: /usr/sbin/lvmconf <command>

Commands:
Enable clvm:  --enable-cluster [--lockinglibdir <dir>] [--lockinglib <lib>]
Disable clvm: --disable-cluster
Enable halvm: --enable-halvm
Disable halvm: --disable-halvm
Set locking library: --lockinglibdir <dir> [--lockinglib <lib>]

Comment 5 Corey Marthaler 2016-02-15 17:58:17 UTC
Looks like all of the following test cases now work as expected, marking verified.


2.6.32-615.el6.x86_64
lvm2-2.02.141-2.el6    BUILT: Wed Feb 10 07:49:03 CST 2016
lvm2-libs-2.02.141-2.el6    BUILT: Wed Feb 10 07:49:03 CST 2016
lvm2-cluster-2.02.141-2.el6    BUILT: Wed Feb 10 07:49:03 CST 2016
udev-147-2.66.el6    BUILT: Mon Jan 18 02:42:20 CST 2016
device-mapper-1.02.115-2.el6    BUILT: Wed Feb 10 07:49:03 CST 2016
device-mapper-libs-1.02.115-2.el6    BUILT: Wed Feb 10 07:49:03 CST 2016
device-mapper-event-1.02.115-2.el6    BUILT: Wed Feb 10 07:49:03 CST 2016
device-mapper-event-libs-1.02.115-2.el6    BUILT: Wed Feb 10 07:49:03 CST 2016
device-mapper-persistent-data-0.6.1-1.el6    BUILT: Wed Feb 10 05:09:45 CST 2016
cmirror-2.02.141-2.el6    BUILT: Wed Feb 10 07:49:03 CST 2016



[root@host-113 ~]# grep locking_type /etc/lvm/lvm.conf
        # Configuration option global/locking_type.
        #     when to use it instead of the configured locking_type.
    locking_type = 3

[root@host-113 ~]# lvmconf  --services --lockinglibdir /root
[root@host-113 ~]# grep locking_type /etc/lvm/lvm.conf
    locking_type = 2

[root@host-113 ~]# lvmconf --enable-cluster
[root@host-113 ~]# grep locking_type /etc/lvm/lvm.conf
    locking_type = 3

[root@host-113 ~]# lvmconf --disable-cluster
[root@host-113 ~]# grep locking_type /etc/lvm/lvm.conf
    locking_type = 1

[root@host-113 ~]# lvmconf --lockinglibdir /root
[root@host-113 ~]# grep locking_type /etc/lvm/lvm.conf
    locking_type = 2

[root@host-113 ~]# lvmconf --enable-halvm
[root@host-113 ~]# grep locking_type /etc/lvm/lvm.conf
    locking_type = 1

[root@host-113 ~]# lvmconf --enable-halvm --lockinglibdir /root
Either HA LVM or cluster method may be used at one time

[root@host-113 ~]# lvmconf --enable-cluster --lockinglibdir /root
[root@host-113 ~]# grep locking_type /etc/lvm/lvm.conf
    locking_type = 2

[root@host-113 ~]# lvmconf --disable-cluster --lockinglibdir /root
[root@host-113 ~]# grep locking_type /etc/lvm/lvm.conf
    locking_type = 2

[root@host-113 ~]# lvmconf --enable-cluster --enable-halvm
Either HA LVM or cluster method may be used at one time

[root@host-113 ~]# lvmconf --enable-halvm --lockinglibdir /root
Either HA LVM or cluster method may be used at one time

[root@host-113 ~]# lvmconf --enable-cluster 
[root@host-113 ~]# grep locking_type /etc/lvm/lvm.conf
    locking_type = 3

Comment 7 errata-xmlrpc 2016-05-11 01:16:36 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.

https://rhn.redhat.com/errata/RHBA-2016-0964.html


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