Bug 1182119

Summary: A cloned resource banned on one of the nodes is shown as Inactive in GUI
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.1CC: cluster-maint, mlisik, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.143-1.el7 Doc Type: Bug Fix
Doc Text:
Cause: Cloned resource banned from running on one node is present in cluster. Consequence: In web UI cloned resource banned on one node there is false status displayed. Fix: Treat cloned resources as running when they are started on one node at least. Result: Cloned resource banned from running on one node is in web UI shown as running.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 09:34:07 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:
Bug Depends On: 1189857    
Bug Blocks:    

Description Radek Steiger 2015-01-14 13:35:04 UTC
> Description of problem:

When I create a cloned resource and ban it from running on one or more of the nodes, the GUI will show it up as Inactive, whereas it is in fact running fine:

# pcs resource create dummy0 Dummy --clone
# pcs constraint location dummy0 avoids virt-044
# pcs status
...
 Clone Set: dummy0-clone [dummy0]
     Started: [ virt-041 virt-042 virt-043 ]
     Stopped: [ virt-044 ]
...

Oddly enough when I add any other resource (stopped or running, doesn't matter) the GUI will start showing the dummy0 as Running.

I believe it has the same root cause as cloning a resource with --wait flag when a ban constraint exists:

# pcs resource create dummy0 Dummy
# pcs constraint location dummy0 avoids virt-044
# pcs resource clone dummy0 --wait
Error: Unable to start clones of 'dummy0'
waiting timed out
Resource 'dummy0' is running on nodes virt-041, virt-042, virt-043.

I think in both cases it expects the clone to run on all nodes which will never materialize.


> Version-Release number of selected component (if applicable):
pcs-0.9.137-10.el7


> How reproducible:
Always

> Steps to Reproduce:
1. pcs resource create dummy0 Dummy --clone
2. pcs constraint location dummy0 avoids <node>
3. compare pcs status output and GUI state

> Actual results:
Pcs status shows the clone as stopped on one node and running on all other. GUI shows as Inactive.

> Expected results:
Both pcs status and the GUI show as running.

Comment 2 Tomas Jelinek 2015-08-10 13:18:36 UTC
Fixed in a complex rewrite of the resources page in web UI, patches in bz1189857


Before Fix:
[root@rh71-node1 ~]# rpm -q pcs
pcs-0.9.142-2.el7.x86_64
[root@rh71-node1:~]# pcs resource create dummy0 Dummy --clone
[root@rh71-node1:~]# pcs constraint location dummy0-clone avoids rh71-node3
[root@rh71-node1:~]# pcs resource
 Clone Set: dummy0-clone [dummy0]
     Started: [ rh71-node1 rh71-node2 ]
     Stopped: [ rh71-node3 ]

The resource is shown as inactive in the web UI, yet current location is displayed correctly: rh71-node1, rh71-node2



After Fix:
[root@rh71-node1:~]# rpm -q pcs
pcs-0.9.143-1.el7.x86_64
[root@rh71-node1:~]# pcs resource create dummy0 Dummy --clone
[root@rh71-node1:~]# pcs constraint location dummy0-clone avoids rh71-node3
[root@rh71-node1:~]# pcs resource
 Clone Set: dummy0-clone [dummy0]
     Started: [ rh71-node1 rh71-node2 ]
     Stopped: [ rh71-node3 ]

The resource is shown as partially running in the web UI.

Comment 6 errata-xmlrpc 2015-11-19 09:34:07 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-2015-2290.html