Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1606316

Summary: RFE: need a way to manage cmirrord for use with lvmlockd agent
Product: Red Hat Enterprise Linux 7 Reporter: Corey Marthaler <cmarthal>
Component: resource-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.6CC: agk, aherr, cfeist, cluster-maint, fdinitto, sbradley, teigland
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: resource-agents-4.1.1-8.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:39:24 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 Corey Marthaler 2018-07-20 19:28:49 UTC
Description of problem:
With the clvmd resource, you could configure it "with_cmirrord=1" for use with shared activated mirror volumes. Currently that functionality doesn't exist w/ lvmlockd.

[root@mckinley-01 ~]# pcs resource create lvmlockd lvmlockd with_cmirrord=1 op monitor interval=30s clone interleave=true ordered=true
Assumed agent name 'ocf:heartbeat:lvmlockd' (deduced from 'lvmlockd')
Error: invalid resource option 'with_cmirrord', allowed options are: adopt, pidfile, socket_path, syslog_priority, trace_file, trace_ra, use --force to override

[root@mckinley-01 ~]# pcs resource create lvmlockd lvmlockd op monitor interval=30s clone interleave=true ordered=true
Assumed agent name 'ocf:heartbeat:lvmlockd' (deduced from 'lvmlockd')
[root@mckinley-01 ~]# pcs constraint order set dlm_for_lvmlockd-clone lvmlockd-clone sequential=true

[root@mckinley-01 ~]# pcs status
Cluster name: MCKINLEY
Stack: corosync
Current DC: mckinley-01 (version 1.1.19-3.el7-c3c624ea3d) - partition with quorum
Last updated: Fri Jul 20 14:19:01 2018
Last change: Fri Jul 20 14:17:29 2018 by root via cibadmin on mckinley-01

3 nodes configured
7 resources configured

Online: [ mckinley-01 mckinley-02 mckinley-03 ]

Full list of resources:

 mckinley-apc   (stonith:fence_apc):    Started mckinley-01
 Clone Set: dlm_for_lvmlockd-clone [dlm_for_lvmlockd]
     Started: [ mckinley-01 mckinley-02 mckinley-03 ]
 Clone Set: lvmlockd-clone [lvmlockd]
     Started: [ mckinley-01 mckinley-02 mckinley-03 ]

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/disabled

[root@mckinley-01 ~]# vgcreate  --shared  test /dev/mapper/mpatha1 /dev/mapper/mpathb1 /dev/mapper/mpathc1 /dev/mapper/mpathd1 /dev/mapper/mpathe1 /dev/mapper/mpathf1
  Volume group "test" successfully created
  VG test starting dlm lockspace
  Starting locking.  Waiting until locks are ready...

[root@mckinley-01 ~]# vgchange --lock-start test
  Starting locking.  Waiting until locks are ready...

[root@mckinley-01 ~]# lvcreate --activate sy --type mirror -m 2 -n cmirror -L 300M test
  cmirrord must be running to activate an LV in shared mode.
  Failed to lock logical volume test/cmirror.
  Failed to activate new LV.



Version-Release number of selected component (if applicable):
resource-agents-4.1.1-2.el7.x86_64
Build Date  : Tue 03 Jul 2018 07:32:31 AM CDT

Comment 3 David Teigland 2018-07-20 19:40:20 UTC
Can part of the setup steps be to enable the cmirrord systemd service if you are using cluster mirroring?

Comment 4 Chris Feist 2018-07-20 21:01:42 UTC
I think we need to have the cluster monitoring cmirrord.  If cmirrord dies should the node get fenced (or at least volumes unmounted)?

Also, do you think it makes sense for us to include the cmirrord monitoring inside lvmlockd (like it was inside clvmd)?  Is there ever a use case to use cmirrord without lvmlockd?

Comment 5 David Teigland 2018-07-23 14:31:58 UTC
It could make sense to include cmirrord in the lvmlockd agent.  cmirrord probably won't be around for too much longer.  If we can pull those bits out of lvmlockd when it's gone, then I don't have a problem with it.

You'll always be using lvmlockd when using cmirrord.

Another detail we might face in the future is restarting the daemons if they fail.  lvmlockd can be restarted if it fails (I don't think we're using that ability right now.)  I don't know about restarting cmirrord.

Comment 6 Oyvind Albrigtsen 2018-08-21 11:11:31 UTC
https://github.com/ClusterLabs/resource-agents/pull/1195

Comment 8 Corey Marthaler 2018-08-24 22:03:16 UTC
Fix verified in the latest rpms.

[root@mckinley-01 ~]# rpm -qi resource-agents
Name        : resource-agents
Version     : 4.1.1
Release     : 8.el7
Architecture: x86_64
Install Date: Fri 24 Aug 2018 04:52:50 PM CDT
Group       : System Environment/Base
Size        : 1367693
License     : GPLv2+ and LGPLv2+ and ASL 2.0
Signature   : (none)
Source RPM  : resource-agents-4.1.1-8.el7.src.rpm
Build Date  : Thu 23 Aug 2018 02:07:45 AM CDT



[root@mckinley-01 ~]# ps -ef | grep cmirrord
root     58447 13379  0 16:55 pts/0    00:00:00 grep --color=auto cmirrord

[lvm_lockd_dlm_start] Setting up and starting dlm on
[lvm_lockd_dlm_start] pcs property set no-quorum-policy=freeze
[lvm_lockd_dlm_start] pcs resource create dlm_for_lvmlockd controld op monitor interval=30s clone interleave=true ordered=true
[lvm_lockd_dlm_start] pcs resource create lvmlockd lvmlockd with_cmirrord=1 op monitor interval=30s clone interleave=true ordered=true
[lvm_lockd_dlm_start] pcs constraint order set dlm_for_lvmlockd-clone lvmlockd-clone sequential=true

[root@mckinley-01 ~]# ps -ef | grep cmirror
root     60855     1  0 16:57 ?        00:00:00 cmirrord
root     64789 13379  0 17:01 pts/0    00:00:00 grep --color=auto cmirror

Comment 10 errata-xmlrpc 2018-10-30 11:39:24 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://access.redhat.com/errata/RHBA-2018:3278