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 - A change in "crm_resource --set-parameter is-managed" introduces regression for Clone and M/S resources
Summary: A change in "crm_resource --set-parameter is-managed" introduces regression f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1267265
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-05 10:04 UTC by Radek Steiger
Modified: 2015-11-19 09:39 UTC (History)
7 users (show)

Fixed In Version: pcs-0.9.143-14.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1267265
Environment:
Last Closed: 2015-11-19 09:39:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2290 0 normal SHIPPED_LIVE Moderate: pcs security, bug fix, and enhancement update 2015-11-19 09:43:53 UTC

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


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