Red Hat Bugzilla – Bug 1268801
A change in "crm_resource --set-parameter is-managed" introduces regression for Clone and M/S resources
Last modified: 2015-11-19 04:39:00 EST
The change has been introduced in recent pacemaker, but pcs only uses the inner (children) attribute when switching a resource back to managed [root@virt-142 ~]# pcs resource Master/Slave Set: stateful0-master [stateful0] Masters: [ virt-145 ] Slaves: [ virt-142 virt-143 virt-144 ] [root@virt-142 ~]# pcs resource unmanage stateful0 [root@virt-142 ~]# pcs resource Master/Slave Set: stateful0-master [stateful0] (unmanaged) stateful0 (ocf::pacemaker:Stateful): Master virt-145 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started virt-142 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started virt-144 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started virt-143 (unmanaged) [root@virt-142 ~]# pcs resource manage stateful0 [root@virt-142 ~]# pcs resource Master/Slave Set: stateful0-master [stateful0] (unmanaged) stateful0 (ocf::pacemaker:Stateful): Master virt-145 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started virt-142 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started virt-144 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started virt-143 (unmanaged) [root@virt-142 ~]# pcs resource manage stateful0-master [root@virt-142 ~]# pcs resource Master/Slave Set: stateful0-master [stateful0] (unmanaged) stateful0 (ocf::pacemaker:Stateful): Master virt-145 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started virt-142 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started virt-144 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started virt-143 (unmanaged) We need to count with this situation too: <master id="stateful0-master"> <primitive class="ocf" id="stateful0" provider="pacemaker" type="Stateful"> <instance_attributes id="stateful0-instance_attributes"/> <operations/> <meta_attributes id="stateful0-meta_attributes"/> </primitive> <meta_attributes id="stateful0-master-meta_attributes"> <nvpair id="stateful0-master-meta_attributes-is-managed" name="is-managed" value="false"/> </meta_attributes> </master> Ideally we should check the whole tree just like we do in resource enable/disable.
Before Fix: [root@host-604 ~]# rpm -q pcs pcs-0.9.143-11.el7.x86_64 [root@host-604 ~]# pcs resource create stateful0 Stateful --master Warning: changing a monitor operation interval from 10 to 11 to make the operation unique [root@host-604 ~]# pcs resource unmanage stateful0 [root@host-604 ~]# pcs resource manage stateful0 [root@host-604 ~]# pcs status ... Master/Slave Set: stateful0-master [stateful0] (unmanaged) stateful0 (ocf::pacemaker:Stateful): Master host-604 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started host-600 (unmanaged) Still unmanaged.... After Fix: [root@host-600 ~]# rpm -q pcs pcs-0.9.143-12.el7.x86_64 [root@host-600 ~]# pcs resource create stateful0 Stateful --master Warning: changing a monitor operation interval from 10 to 11 to make the operation unique [root@host-600 ~]# pcs resource unmanage stateful0 [root@host-600 ~]# pcs status ... Master/Slave Set: stateful0-master [stateful0] (unmanaged) stateful0 (ocf::pacemaker:Stateful): Master host-604 (unmanaged) stateful0 (ocf::pacemaker:Stateful): Started host-600 (unmanaged) ... [root@host-600 ~]# pcs resource manage stateful0 [root@host-600 ~]# pcs status Master/Slave Set: stateful0-master [stateful0] Masters: [ host-604 ] Slaves: [ host-600 ]
Before Fix: [root@host-600 ~]# rpm -q pcs pcs-0.9.143-12.el7.x86_64 [root@host-600 ~]# pcs resource create dummy0 Dummy [root@host-600 ~]# pcs resource create dummy1 Dummy [root@host-600 ~]# pcs resource group add group0 dummy0 dummy1 [root@host-600 ~]# pcs resource clone group0 [root@host-600 ~]# pcs resource Clone Set: group0-clone [group0] Started: [ host-600 host-604 ] [root@host-600 ~]# pcs resource unmanage group0 ; pcs resource meta group0 is-managed=false; pcs resource meta group0-clone is-managed=false [root@host-600 ~]# pcs resource Clone Set: group0-clone [group0] (unmanaged) Resource Group: group0:0 dummy0 (ocf::heartbeat:Dummy): Started host-604 (unmanaged) dummy1 (ocf::heartbeat:Dummy): Started host-604 (unmanaged) Resource Group: group0:1 dummy0 (ocf::heartbeat:Dummy): Started host-600 (unmanaged) dummy1 (ocf::heartbeat:Dummy): Started host-600 (unmanaged) [root@host-600 ~]# pcs resource manage group0 [root@host-600 ~]# pcs resource Clone Set: group0-clone [group0] (unmanaged) Resource Group: group0:0 dummy0 (ocf::heartbeat:Dummy): Started host-604 (unmanaged) dummy1 (ocf::heartbeat:Dummy): Started host-604 (unmanaged) Resource Group: group0:1 dummy0 (ocf::heartbeat:Dummy): Started host-600 (unmanaged) dummy1 (ocf::heartbeat:Dummy): Started host-600 (unmanaged) [root@host-600 ~]# pcs config | grep is-manage Meta Attrs: is-managed=false [root@host-600 ~]# pcs resource unmanage group0 ; pcs resource meta group0 is-managed=false; pcs resource meta group0-clone is-managed=false [root@host-600 ~]# pcs resource manage group0-clone [root@host-600 ~]# pcs config | grep is-manage Meta Attrs: is-managed=false [root@host-600 ~]# After Fix: [root@host-604 pcs]# rpm -q pcs pcs-0.9.143-14.el7.x86_64 [root@host-604 pcs]# pcs resource unmanage group0 ; pcs resource meta group0 is-managed=false; pcs resource meta group0-clone is-managed=false [root@host-604 pcs]# pcs resource Clone Set: group0-clone [group0] (unmanaged) Resource Group: group0:0 dummy0 (ocf::heartbeat:Dummy): Started host-604 (unmanaged) dummy1 (ocf::heartbeat:Dummy): Started host-604 (unmanaged) Resource Group: group0:1 dummy0 (ocf::heartbeat:Dummy): Started host-600 (unmanaged) dummy1 (ocf::heartbeat:Dummy): Started host-600 (unmanaged) [root@host-604 pcs]# pcs resource manage group0 [root@host-604 pcs]# pcs resource Clone Set: group0-clone [group0] Started: [ host-600 host-604 ] [root@host-604 pcs]# pcs config | grep is-manage [root@host-604 pcs]# [root@host-604 pcs]# pcs resource unmanage group0 ; pcs resource meta group0 is-managed=false; pcs resource meta group0-clone is-managed=false [root@host-604 pcs]# pcs resource manage group0-clone [root@host-604 pcs]# pcs config | grep is-manage [root@host-604 pcs]# I couldn't replicate the 3rd bug, but I've removed contains so that shouldn't be an issue in the future.
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/RHSA-2015-2290.html