Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1186527

Summary: pcs reports a failure on stopping M/S resource when only slaves are running
Product: Red Hat Enterprise Linux 7 Reporter: Radek Steiger <rsteiger>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED DUPLICATE QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.1CC: cluster-maint, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: User stops / deletes a multi-state resource with only slaves running and no master instance running. Consequence: Pcs reports error saying it was not able to stop the resource even though the resource has stopped. Fix: Check for both master and slave instances of the resource. Result: Pcs reports the resource has stopped / has been deleted.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-26 10:10:45 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-01-27 21:26:46 UTC
> Description of problem:

When a M/S resource is running as slave only via master-max=0, pcs has issues recognizing true state of the resources. Both disabling and deleting such resource reports that stopping failed, which is however not true as seen from the status output below.


> Reproducer 1:

[root@virt-010 ~]# pcs resource create stateful0 Stateful --master meta master-max=0 clone-max=1 

[root@virt-010 ~]# pcs resource 
 Master/Slave Set: stateful0-master [stateful0]
     Slaves: [ virt-010 ]

[root@virt-010 ~]# pcs resource delete stateful0
Attempting to stop: stateful0...Error: Unable to stop: stateful0 before deleting (re-run with --force to force deletion)

[root@virt-010 ~]# pcs resource 
 Master/Slave Set: stateful0-master [stateful0]
     Stopped: [ virt-010 virt-011 virt-012 ]

[root@virt-010 ~]# pcs resource delete stateful0
Deleting Resource - stateful0


> Reproducer 2:

[root@virt-010 ~]# pcs resource create stateful0 Stateful --master meta master-max=0 clone-max=1 

[root@virt-010 ~]# pcs resource 
 Master/Slave Set: stateful0-master [stateful0]
     Slaves: [ virt-010 ]

[root@virt-010 ~]# pcs resource disable stateful0 --wait
Error: unable to stop: 'stateful0', please check logs for failure information
Resource 'stateful0' is slave on node virt-010.

[root@virt-010 ~]# pcs resource 
 Master/Slave Set: stateful0-master [stateful0]
     Stopped: [ virt-010 virt-011 virt-012 ]


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

pcs-0.9.137-13.el7

Comment 1 Tomas Jelinek 2015-03-17 14:52:35 UTC
Patch in upstream:
https://github.com/feist/pcs/commit/900274a059fe6dd6ffef1ac84d7f67c92a392f33


Tests:

> Reproducer 1:
[root@rh70-node1:~]# pcs resource create stateful0 Stateful --master meta master-max=0 clone-max=1
[root@rh70-node1:~]# pcs resource
 Master/Slave Set: stateful0-master [stateful0]
     Slaves: [ rh70-node3 ]
[root@rh70-node1:~]# pcs resource delete stateful0
Attempting to stop: stateful0...Stopped
[root@rh70-node1:~]# echo $?
0
[root@rh70-node1:~]# pcs resource

> Reproducer 2:
[root@rh70-node1:~]# pcs resource create stateful0 Stateful --master meta master-max=0 clone-max=1
[root@rh70-node1:~]# pcs resource
 Master/Slave Set: stateful0-master [stateful0]
     Slaves: [ rh70-node3 ]
[root@rh70-node1:~]# pcs resource disable stateful0 --wait
Resource 'stateful0' is not running on any node
[root@rh70-node1:~]# echo $?
0
[root@rh70-node1:~]# pcs resource
 Master/Slave Set: stateful0-master [stateful0]
     Stopped: [ rh70-node1 rh70-node2 rh70-node3 ]