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 1389941 - 'pcs booth remove' doesn't remove resources properly if the booth group is disabled
Summary: 'pcs booth remove' doesn't remove resources properly if the booth group is di...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-29 18:24 UTC by Radek Steiger
Modified: 2017-08-01 18:24 UTC (History)
5 users (show)

Fixed In Version: pcs-0.9.157-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: User runs the 'pcs booth remove' command when the booth resource group is disabled. Consequence: The booth resource group is not removed completely. Fix: Properly find the booth resource group in CIB even if it is disabled. Result: The booth resource group is completely removed.
Clone Of:
Environment:
Last Closed: 2017-08-01 18:24:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (6.98 KB, patch)
2016-11-10 11:37 UTC, Tomas Jelinek
no flags Details | Diff
proposed fix 2 (3.87 KB, patch)
2017-03-13 09:13 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1958 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2017-08-01 18:09:47 UTC

Description Radek Steiger 2016-10-29 18:24:37 UTC
> 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 ~]#

Comment 2 Tomas Jelinek 2016-11-10 11:37:28 UTC
Created attachment 1219333 [details]
proposed fix

Test is included in the patch.

Comment 4 Ivan Devat 2017-02-20 07:41:58 UTC
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

Comment 6 Tomas Jelinek 2017-03-13 09:13:25 UTC
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.

Comment 7 Ivan Devat 2017-04-10 15:55:39 UTC
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.

Comment 11 errata-xmlrpc 2017-08-01 18:24:40 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://access.redhat.com/errata/RHBA-2017:1958


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