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 1268801

Summary: A change in "crm_resource --set-parameter is-managed" introduces regression for Clone and M/S resources
Product: Red Hat Enterprise Linux 7 Reporter: Radek Steiger <rsteiger>
Component: pcsAssignee: Chris Feist <cfeist>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: abeekhof, cfeist, cluster-maint, cluster-qe, fdinitto, tlavigne, tojeline
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 09:39:00 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:
Bug Depends On: 1267265    
Bug Blocks:    

Comment 1 Radek Steiger 2015-10-05 10:11:42 UTC
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 21:27:49 UTC
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 23:14:29 UTC
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 09:39:00 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/RHSA-2015-2290.html