Bug 1286664

Summary: pcsd: deleting groups/clones from older cluster returns Internal Server Error
Product: Red Hat Enterprise Linux 7 Reporter: Radek Steiger <rsteiger>
Component: pcsAssignee: Ondrej Mular <omular>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.2CC: cfeist, cluster-maint, idevat, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.151-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 20:55:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Radek Steiger 2015-11-30 13:05:27 UTC
> Description of problem:

When using pcs 0.9.143 to manage an older cluster with pcs older than 0.9.143, deleting groups and/or clones in the tree view returns an Internal Server Error.

The problem is in the list of resources to be removed which includes both the group/clone name AND all the primitives inside. The old backend then tries to delete the group/clone first and then the primitives second, which are already gone however with the group/clone removal:

I, [2015-11-30T13:32:18.872390 #10163]  INFO -- : Running: /usr/sbin/pcs --force resource delete group21
I, [2015-11-30T13:32:19.868892 #10163]  INFO -- : Running: /usr/sbin/pcs --force resource delete dummy21
I, [2015-11-30T13:32:20.136211 #10163]  INFO -- : Remove resource errors:
Unable to remove: dummy21
::ffff:10.15.105.137 - - [30/Nov/2015 13:32:20] "POST /remote/remove_resource HTTP/1.1" 500 26 1.3123
::ffff:10.15.105.137 - - [30/Nov/2015 13:32:20] "POST /remote/remove_resource HTTP/1.1" 500 26 1.3125
::ffff:10.15.105.137 - - [30/Nov/2015:13:32:18 CET] "POST /remote/remove_resource HTTP/1.1" 500 26
- -> /remote/remove_resource

This should be fixed on the GUI side because only the parent should be sent in the list if the whole group/clone is meant to be removed. Also, please don't forget about the Select All tickbox is causing the same issue.


> Version-Release number of selected component (if applicable):

pcs-0.9.143-15.el7       (RHEL7.2)
+
pcs-0.9.137-13.el7_1.5   (RHEL7.1)


> How reproducible:

Always


> Steps to Reproduce:
1. Add a RHEL7.1 based cluster into RHEL7.2 GUI
2. Add a resource group/clone
3. Remove the whole group/clone by selecting the group/clone tickbox

Comment 1 Ondrej Mular 2016-02-01 15:06:08 UTC
proposed fix:
https://github.com/feist/pcs/commit/c86f86f022dbd1d82a708259bb5e3c78b724e1b8

Test:
1. manage RHEL 7.1 cluster in GUI
2. create clone/group resource
3. remove whole clone/group by selecting the clone/group checkbox
4. resources are removed successfully with no error

Comment 2 Mike McCune 2016-03-28 23:15:27 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 3 Ivan Devat 2016-05-31 12:18:21 UTC
Before fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.143-15.el7.x86_64

1. Add a RHEL7.1 based cluster into RHEL7.2 GUI
2. Add a resource group/clone
3. Remove the whole group/clone by selecting the group/clone tickbox
4. On RHEL7.1 machine:
[rhel71-1 ~] cat /var/log/pcsd/pcsd.log|grep 500
::ffff:192.168.122.11 - - [27/May/2016 10:10:21] "POST /remote/remove_resource HTTP/1.1" 500 40 0.5792
::ffff:192.168.122.11 - - [27/May/2016 10:10:21] "POST /remote/remove_resource HTTP/1.1" 500 40 0.5796
vm-rhel72-1 - - [27/May/2016:10:10:20 CEST] "POST /remote/remove_resource HTTP/1.1" 500 40

After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.151-1.el7.x86_64

1. Add a RHEL7.1 based cluster into RHEL7.2 GUI
2. Add a resource group/clone
3. Remove the whole group/clone by selecting the group/clone tickbox
4. On RHEL7.1 machine:
[rhel71-1 ~] cat /var/log/pcsd/pcsd.log|grep 500

Comment 7 errata-xmlrpc 2016-11-03 20:55:54 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-2016-2596.html