Bug 1302398

Summary: Document that lvmlockd|lvmpolld features are available only if compiled in
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
lvm2 sub component: Configuration files (RHEL6) QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, prockai, tlavigne, zkabelac
Version: 6.8   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.143-4.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-11 01:20:40 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:
Attachments:
Description Flags
Patch to mark config settings related to lvmlockd and lvmpolld as unsupported none

Description Corey Marthaler 2016-01-27 18:21:40 UTC
Description of problem:
Looks like the rebase grabbed the lvmlockd stuff, that needs to come out since lvmlockd isn't supported/tested in rhel6.

[root@host-116 ~]# grep lockd /etc/lvm/lvm.conf 
        # Configuration option global/use_lvmlockd.
        # Use lvmlockd for locking among hosts using LVM on shared storage.
        # See lvmlockd(8) for more information.
        use_lvmlockd = 0
        # Configuration option global/lvmlockd_lock_retries.
        # Retry lvmlockd lock requests this many times.
        # lvmlockd_lock_retries = 3


Version-Release number of selected component (if applicable):
2.6.32-604.el6.x86_64

lvm2-2.02.140-3.el6    BUILT: Thu Jan 21 05:40:10 CST 2016
lvm2-libs-2.02.140-3.el6    BUILT: Thu Jan 21 05:40:10 CST 2016
lvm2-cluster-2.02.140-3.el6    BUILT: Thu Jan 21 05:40:10 CST 2016
udev-147-2.66.el6    BUILT: Mon Jan 18 02:42:20 CST 2016
device-mapper-1.02.114-3.el6    BUILT: Thu Jan 21 05:40:10 CST 2016
device-mapper-libs-1.02.114-3.el6    BUILT: Thu Jan 21 05:40:10 CST 2016
device-mapper-event-1.02.114-3.el6    BUILT: Thu Jan 21 05:40:10 CST 2016
device-mapper-event-libs-1.02.114-3.el6    BUILT: Thu Jan 21 05:40:10 CST 2016
device-mapper-persistent-data-0.6.0-1.el6    BUILT: Wed Jan 20 11:23:29 CST 2016
cmirror-2.02.140-3.el6    BUILT: Thu Jan 21 05:40:10 CST 2016

Comment 1 Corey Marthaler 2016-01-27 19:52:01 UTC
Same here:

[root@host-115 ~]# grep polld /etc/lvm/lvm.conf 
        # metadata, cache, locking, lvmpolld. Use "all" to see everything.
        debug_classes = [ "memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking", "lvmpolld" ]
        # Configuration option global/use_lvmpolld.
        # Use lvmpolld to supervise long running LVM commands.
        # from the original LVM command to the lvmpolld daemon. This allows
        # After lvmpolld takes over, the LVM command displays the progress
        # of the ongoing operation. lvmpolld itself runs LVM commands to
        # manage the progress of ongoing operations. lvmpolld can be used as
        use_lvmpolld = 0

Comment 2 Peter Rajnoha 2016-01-28 10:10:18 UTC
Created attachment 1119086 [details]
Patch to mark config settings related to lvmlockd and lvmpolld as unsupported

We need to add an extra patch for 6.8 to mark all these configuration settings as "unsupported".

Comment 4 Corey Marthaler 2016-02-12 19:47:36 UTC
Should these references be removed as well?


[root@host-123 ~]# vgcreate --shared vg4 /dev/sdd1
  Using a shared lock type requires lvmlockd.
  Run `vgcreate --help' for more information.

VGCREATE(8)                                                        VGCREATE(8)

       --shared
                     Create a shared VG using lvmlockd.  lvmlockd will select lock type sanlock or dlm depending on which lock manager is running.  This allows multiple hosts
                     to share a VG on shared devices.  See lvmlockd(8).

Comment 5 Peter Rajnoha 2016-02-15 08:27:50 UTC
OK, I'll go through that once again...

Comment 6 Alasdair Kergon 2016-03-10 07:42:15 UTC
The upstream should be fixed here: either excluded from the build or else marked as only applicable when available on the system.  RHEL-specific patches should be avoidable.

Comment 7 Peter Rajnoha 2016-03-24 14:02:49 UTC
OK, so systematic solution here is for every conditional setting that is based on the result of configure script will be placed into the generated lvm.conf only if the feature was configured via configure.

Also, there's going to be a flag marking such config options in config_setting.h file (also based on the result of configure script) and if someone uses an lvm.conf option that is ignored (because support for that feature is not compiled in), there's going to be a warning message issued that the configuration option has no effect.

Of course, there are more settings here, not just lvmlockd and lvmpolld - any setting where the functionality is based on the result of configure script - so it's conditional.

Comment 8 Peter Rajnoha 2016-03-30 12:13:24 UTC
Let's go with marking these lockd/polld features as available in man pages/config only if LVM is compiled with lockd/polld. Patch:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=06ef7ba8765d64044b008a33f1c1faeac6112a4a

I'll open a new BZ for global solution as mentioned in comment #7.

Comment 13 Corey Marthaler 2016-03-31 15:29:09 UTC
Marking verified in the latest rpms. 


lvm2-2.02.143-5.el6    BUILT: Wed Mar 30 09:16:24 CDT 2016
lvm2-libs-2.02.143-5.el6    BUILT: Wed Mar 30 09:16:24 CDT 2016
lvm2-cluster-2.02.143-5.el6    BUILT: Wed Mar 30 09:16:24 CDT 2016
udev-147-2.72.el6    BUILT: Tue Mar  1 06:14:05 CST 2016
device-mapper-1.02.117-5.el6    BUILT: Wed Mar 30 09:16:24 CDT 2016
device-mapper-libs-1.02.117-5.el6    BUILT: Wed Mar 30 09:16:24 CDT 2016
device-mapper-event-1.02.117-5.el6    BUILT: Wed Mar 30 09:16:24 CDT 2016
device-mapper-event-libs-1.02.117-5.el6    BUILT: Wed Mar 30 09:16:24 CDT 2016
device-mapper-persistent-data-0.6.2-0.1.rc7.el6    BUILT: Tue Mar 22 08:58:09 CDT 2016
cmirror-2.02.143-5.el6    BUILT: Wed Mar 30 09:16:24 CDT 2016



All new features originally requested to be removed are back in the conf files, however they now have notes about being "applicable only if LVM is compiled with..."


[root@host-116 lvm]# grep compiled lvm.conf 
        # directories will be scanned fully. LVM needs to be compiled with
        #     compiled with udev support.
        # detection code, but may take longer. LVM needs to be compiled with
        # If support for LVM1 metadata was compiled as a shared library use
        # Applicable only if LVM is compiled with lockd support in which
        # Applicable only if LVM is compiled with lockd support
        # and can cause lvcreate to fail. Applicable only if LVM is compiled
        # Applicable only if LVM is compiled with lvmpolld support.
[root@host-116 lvm]# grep compiled lvmlocal.conf 
        # Applicable only if LVM is compiled with lockd support

Comment 15 errata-xmlrpc 2016-05-11 01:20:40 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