Hide Forgot
> Description of problem: Removing booth resource and its IPaddr2 sibling with 'pcs remove commands' fails when the group is disabled, leaving the IP resource in place and removing the booth-site instance only. This however doesn't happen when the group as such is enabled, but any of the resources is either disabled or stopped. [root@virt-019 ~]# pcs status ... Resource Group: booth-booth-group booth-booth-ip (ocf::heartbeat:IPaddr2): Started virt-029.cluster-qe.lab.eng.brq.redhat.com booth-booth-service (ocf::pacemaker:booth-site): Started virt-029.cluster-qe.lab.eng.brq.redhat.com ... [root@virt-019 ~]# pcs resource disable booth-booth-group [root@virt-019 ~]# pcs status ... Resource Group: booth-booth-group booth-booth-ip (ocf::heartbeat:IPaddr2): Stopped (disabled) booth-booth-service (ocf::pacemaker:booth-site): Stopped (disabled) ... [root@virt-019 ~]# pcs booth remove Deleting Resource - booth-booth-service [root@virt-019 ~]# pcs status ... Resource Group: booth-booth-group booth-booth-ip (ocf::heartbeat:IPaddr2): Stopped (disabled) ... > Version-Release number of selected component (if applicable): pcs-0.9.152-10.el7.x86_64 > How reproducible: Always > Steps to Reproduce: 1. pcs resource disable booth-booth-group 2. pcs booth remove > Actual results: [root@virt-019 ~]# pcs status | grep booth Resource Group: booth-booth-group booth-booth-ip (ocf::heartbeat:IPaddr2): Stopped (disabled) [root@virt-019 ~]# > Expected results: [root@virt-019 ~]# pcs status | grep booth [root@virt-019 ~]#
Created attachment 1219333 [details] proposed fix Test is included in the patch.
After Fix: [vm-rhel72-1 ~] $ rpm -q pcs pcs-0.9.156-1.el7.x86_64 [vm-rhel72-1 ~] $ pcs resource NO resources configured [vm-rhel72-1 ~] $ booth create ip 192.168.122.120 client operation "create" is unknown [vm-rhel72-1 ~] $ pcs booth create ip 192.168.122.120 [vm-rhel72-1 ~] $ pcs resource disable booth-booth-group [vm-rhel72-1 ~] $ pcs resource show Resource Group: booth-booth-group booth-booth-ip (ocf::heartbeat:IPaddr2): Stopped (disabled) booth-booth-service (ocf::pacemaker:booth-site): Stopped (disabled) [vm-rhel72-1 ~] $ pcs booth remove Deleting Resource - booth-booth-ip Deleting Resource (and group) - booth-booth-service [vm-rhel72-1 ~] $ pcs resource show NO resources configured
Created attachment 1262357 [details] proposed fix 2 Fixed crash when the group's meta_attributes are placed before the group's resources in the CIB. See the test included in the patch for details.
After Fix: [vm-rhel72-1 ~] $ rpm -q pcs pcs-0.9.157-1.el7.x86_64 [vm-rhel72-1 ~] $ pcs resource NO resources configured [vm-rhel72-1 ~] $ pcs booth create ip 192.168.122.120 [vm-rhel72-1 ~] $ pcs resource disable booth-booth-group [vm-rhel72-1 ~] $ pcs cluster cib|grep 'id="booth-booth-group"' -A4 <group id="booth-booth-group"> <meta_attributes id="booth-booth-group-meta_attributes"> <nvpair id="booth-booth-group-meta_attributes-target-role" name="target-role" value="Stopped"/> </meta_attributes> <primitive class="ocf" id="booth-booth-ip" provider="heartbeat" type="IPaddr2"> [vm-rhel72-1 ~] $ pcs booth remove Deleting Resource - booth-booth-ip Deleting Resource (and group) - booth-booth-service [vm-rhel72-1 ~] $ pcs resource NO resources configured > Note that meta_attributes element is placed before primitive elements.
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-2017:1958