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 998970 - pcs resource group remove <group_name> does not remove group resources
Summary: pcs resource group remove <group_name> does not remove group resources
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcs
Version: 6.5
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact:
URL:
Whiteboard:
Depends On: 998964
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-20 12:51 UTC by michal novacek
Modified: 2013-11-21 11:52 UTC (History)
3 users (show)

Fixed In Version: pcs-0.9.74-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Attempting to remove a group containing resources Consequence: Group was removed, but resources remained Fix: 'pcs resource delete <groupname>' now properly deletes a group and the resources it contains Result: Groups and their resources can be removed with one command.
Clone Of: 998964
Environment:
Last Closed: 2013-11-21 11:52:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1633 0 normal SHIPPED_LIVE pcs bug fix and enhancement update 2013-11-20 21:53:48 UTC

Description michal novacek 2013-08-20 12:51:58 UTC
+++ This bug was initially created as a clone of Bug #998964 +++

Description of problem:
I do have a resource in a group haa-group-0. When issuing 'pcs resource
group remove haa-group-0' the group is removed but the resource from this group
is not deleted and remains as ungrupped resources. This is quite unexpected.

Version-Release number of selected component (if applicable):
pcs-0.9.72-1.el6.noarch

How reproducible: always

Steps to Reproduce:
1. create a group with resources using pcs
2. issue 'pcs resource group remove <group_name>'

Actual results: resource are not removed

Expected results: resources should be removed with the group

Additional info:
It would be nice to either have parameter to force resources removal and not to
do it by default or the other way round. Current behaviour is confusing.

$ pcs status
Cluster name: STSRHTS17392
Last updated: Tue Aug 20 14:38:58 2013
Last change: Tue Aug 20 14:38:55 2013 via cibadmin on virt-061
Stack: corosync
Current DC: virt-063 (3) - partition with quorum
Version: 1.1.10-12.el7-368c726
3 Nodes configured
2 Resources configured


Online: [ virt-061 virt-062 virt-063 ]

Full list of resources:

 virt-fencing   (stonith:fence_xvm):    Started virt-062 
 Resource Group: haa-group-0
     apache-0   (ocf::heartbeat:apache):        Stopped 


PCSD Status:
  virt-061: Online
  virt-062: Online
  virt-063: Online

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/enabled

# pcs resource group remove haa-group-0

# pcs status
Cluster name: STSRHTS17392
Last updated: Tue Aug 20 14:39:15 2013
Last change: Tue Aug 20 14:39:10 2013 via cibadmin on virt-063
Stack: corosync
Current DC: virt-063 (3) - partition with quorum
Version: 1.1.10-12.el7-368c726
3 Nodes configured
2 Resources configured


Online: [ virt-061 virt-062 virt-063 ]

Full list of resources:

 virt-fencing   (stonith:fence_xvm):    Started virt-062 
 apache-0       (ocf::heartbeat:apache):        Stopped 


PCSD Status:
  virt-061: Online
  virt-062: Online
  virt-063: Online

Daemon Status:
  corosync: active/disabled
  pacemaker: active/disabled
  pcsd: active/enabled

Comment 2 Chris Feist 2013-08-26 21:29:38 UTC
Before fix:
[root@rh7-1 test]# pcs -f /tmp/test.xml resource create A Dummy --group MyGroup
[root@rh7-1 test]# pcs -f /tmp/test.xml resource create B Dummy --group MyGroup
[root@rh7-1 test]# pcs -f /tmp/test.xml resource 
 Resource Group: MyGroup
     A	(ocf::heartbeat:Dummy):	Stopped 
     B	(ocf::heartbeat:Dummy):	Stopped 

[root@rh7-1 test]# pcs -f /tmp/test.xml resource delete MyGroup
Error: MyGroup is not a resource (it can be removed with 'resource group remove MyGroup')


After fix:
[root@ask-03 ~]# pcs -f /tmp/test.xml resource create A Dummy --group MyGroup
[root@ask-03 ~]# pcs -f /tmp/test.xml resource create B Dummy --group MyGroup
[root@ask-03 ~]# pcs -f /tmp/test.xml resource 
 Resource Group: MyGroup
     A	(ocf::heartbeat:Dummy):	Stopped 
     B	(ocf::heartbeat:Dummy):	Stopped 
[root@ask-03 ~]# pcs -f /tmp/test.xml resource delete MyGroup
Removing group: MyGroup (and all resources within group)
Deleting Resource - A
Deleting Resource (and group) - B
[root@ask-03 ~]# pcs -f /tmp/test.xml resource
NO resources configured
[root@ask-03 ~]# rpm -q pcs
pcs-0.9.74-1.el6.noarch

Comment 5 errata-xmlrpc 2013-11-21 11:52:43 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.

http://rhn.redhat.com/errata/RHBA-2013-1633.html


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