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.
Cause:
User removes a resource from a cluster using Web UI.
Consequence:
The resource is removed from the cluster without being stopped first.
Fix:
Add an option to specify whether the resource should be stopped before it is removed from the cluster.
Result:
By default the resource is stopped before it is removed from the cluster. User can remove the resource without stopping it first by checking a checkbox in Resource Removal dialog.
> Description of problem:
The piece of code responsible for removing resources calls pcs cli with --force flag everytime a resource is being removed. This is helpful in situations when a standard removal procedure fails, but may lead to unforseen consequences when a gracefull stop/remove would actually work just fine.
One reproducer I've been able to hit is this:
1. Create a stateful resource:
# pcs resource create stateful0 Stateful state=/tmp/statefile --master
2. Use the GUI to remove a resource (which is the same as running 'pcs --force resource delete stateful0')
3. The resource ends up in orphaned state
The reproducer might not be 100%, in which case disabling orphan autostop will make it easier to reproduce: 'pcs property set stop-orphan-resources=false'.
We need to find a better way of removing resources reliably without causing unwanted issues like this reproducer.
> Version-Release number of selected component (if applicable):
pcs-0.9.137-10.el7
> Additional info:
Patch at fault:
https://github.com/feist/pcs/commit/0daf1585f3af30047c914c4b8a0bc8a884612cdb
Created attachment 1037335[details]
proposed fix
Test:
There is a checkbox in the Resource Removal dialog which controls the --force flag of the 'pcs resource remove' command. When the checkbox is empty, pcs will wait for the removed resource to stop, otherwise it will delete the resource without stopping it first.
Before Fix:
[root@rh71-node1 ~]# rpm -q pcs
pcs-0.9.140-1.el7.x86_64
[root@rh71-node1:~]# pcs resource create delay delay startdelay=0 stopdelay=10
Delete the delay resource using web UI, then immediately:
[root@rh71-node1:~]# pcs resource
delay (ocf::heartbeat:Delay): ORPHANED Started rh71-node1
After Fix:
[root@rh71-node1:~]# rpm -q pcs
pcs-0.9.141-1.el7.x86_64
[root@rh71-node1:~]# pcs resource create delay delay startdelay=0 stopdelay=10
Delete the delay resource using web UI, a dialog is displayed asking if you want to force the deletion. If you do not enforce it the resource is stopped first and then deleted.
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