Bug 920767 - pcs won't manage or unmanage resource groups
Summary: pcs won't manage or unmanage resource groups
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcs
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-12 17:12 UTC by Michael Young
Modified: 2013-11-21 11:52 UTC (History)
4 users (show)

Fixed In Version: pcs-0.9.77-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: pcs would not allow users to unmanage entire resource groups Consequence: resource groups could not be unmanaged (or managed). Fix: support was added in pcs to manage or unmanage resource groups Result: users can now unmanage/manage entire groups of resources
Clone Of:
Environment:
Last Closed: 2013-11-21 11:52:05 UTC
Target Upstream Version:


Attachments (Terms of Use)


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

Description Michael Young 2013-03-12 17:12:49 UTC
I have upgraded a pair of CentOS servers to 6.4 which means using pcs rather than crm. In crm you used to be able to manage and unmanage resource groups as well as individual resources eg.
crm resource unmanage rscgroup
crm resource manage rscgroup

I would expect to be able to do the same thing with pcs, because crm in 6.3 can leave you in a state that pcs can't easily undo in after upgrading to 6.4, and because otherwise it is difficult to manage and unmanage groups of resources, since if you try to unmanage resources individually in a group there seems to be a good chance that some of the resources get stopped in the process (as unmanaging one resource in a group can stop others).

At present, if you try
pcs resource unmanage rscgroup
for the group rscgroup you get the error
Error: rscgroup doesn't exist

Comment 1 Chris Feist 2013-03-12 19:19:46 UTC
Yes, this definitely should be in pcs.  I've fixed it upstream here:

https://github.com/feist/pcs/commit/29f557da1e3ab4761b93a31fcfc0454991750956

As a temporary workaround you can use the following command to set a group unmanaged:

crm_resource --resource <Name of your group> --set-parameter is-managed --meta --parameter-value false

And to mark a group managed:
crm_resource --resource <Name of your group> --delete-parameter is-managed --meta

Comment 8 Chris Feist 2013-08-13 21:33:56 UTC
[root@ask-02 ~]# pcs -f test.xml resource create Test Dummy --group Test-Group
[root@ask-02 ~]# pcs -f test.xml resource
 Resource Group: Test-Group
     Test	(ocf::heartbeat:Dummy):	Stopped 
[root@ask-02 ~]# pcs -f test.xml resource unmanage Test-Group
[root@ask-02 ~]# pcs -f test.xml resource
 Resource Group: Test-Group
     Test	(ocf::heartbeat:Dummy):	Stopped (unmanaged)

Comment 11 Chris Feist 2013-09-03 23:01:28 UTC
I talked with Andrew and we've slightly changed out pcs resource manage/unmanage work to make this work properly.

So if you try to 'pcs resource manage/unmanage' a group, it will act on all the contained resources.  Which is what most users should expect.  So you can unmanage a group and then manage just one of the contained resources.

[root@ask-02 ~]# rpm -q pcs
pcs-0.9.77-1.el6.noarch
[root@ask-02 ~]# pcs -f bz920767 resource create A1 Dummy --group AG
[root@ask-02 ~]# pcs -f bz920767 resource create A2 Dummy --group AG
[root@ask-02 ~]# pcs -f bz920767 resource
 Resource Group: AG
     A1	(ocf::heartbeat:Dummy):	Stopped 
     A2	(ocf::heartbeat:Dummy):	Stopped 
[root@ask-02 ~]# pcs -f bz920767 resource unmanage AG
[root@ask-02 ~]# pcs -f bz920767 resource
 Resource Group: AG
     A1	(ocf::heartbeat:Dummy):	Stopped (unmanaged) 
     A2	(ocf::heartbeat:Dummy):	Stopped (unmanaged) 
[root@ask-02 ~]# pcs -f bz920767 resource manage A2
[root@ask-02 ~]# pcs -f bz920767 resource
 Resource Group: AG
     A1	(ocf::heartbeat:Dummy):	Stopped (unmanaged) 
     A2	(ocf::heartbeat:Dummy):	Stopped 
[root@ask-02 ~]# pcs -f bz920767 resource manage AG
[root@ask-02 ~]# pcs -f bz920767 resource
 Resource Group: AG
     A1	(ocf::heartbeat:Dummy):	Stopped 
     A2	(ocf::heartbeat:Dummy):	Stopped

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