Bug 1268801 - A change in "crm_resource --set-parameter is-managed" introduces regression for Clone and M/S resources
A change in "crm_resource --set-parameter is-managed" introduces regression f...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs (Show other bugs)
7.2
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Chris Feist
cluster-qe@redhat.com
: Regression
Depends On: 1267265
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-05 06:04 EDT by Radek Steiger
Modified: 2015-11-19 04:39 EST (History)
7 users (show)

See Also:
Fixed In Version: pcs-0.9.143-14.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1267265
Environment:
Last Closed: 2015-11-19 04:39:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Radek Steiger 2015-10-05 06:11:42 EDT
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.
Comment 2 Chris Feist 2015-10-06 17:27:49 EDT
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 ]
Comment 6 Chris Feist 2015-10-07 19:14:29 EDT
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.
Comment 11 errata-xmlrpc 2015-11-19 04:39:00 EST
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

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