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 1198274 - pcsd: don't automatically use --force everytime a resource is being removed
Summary: pcsd: don't automatically use --force everytime a resource is being removed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
Steven J. Levine
URL:
Whiteboard:
Depends On:
Blocks: 1205796
TreeView+ depends on / blocked
 
Reported: 2015-03-03 17:17 UTC by Radek Steiger
Modified: 2015-11-19 09:35 UTC (History)
3 users (show)

Fixed In Version: pcs-0.9.141-1.el7
Doc Type: Bug Fix
Doc Text:
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.
Clone Of:
Environment:
Last Closed: 2015-11-19 09:35:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (19.74 KB, patch)
2015-06-10 14:32 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2290 0 normal SHIPPED_LIVE Moderate: pcs security, bug fix, and enhancement update 2015-11-19 09:43:53 UTC

Description Radek Steiger 2015-03-03 17:17:24 UTC
> 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

Comment 2 Tomas Jelinek 2015-06-10 14:32:04 UTC
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.

Comment 3 Tomas Jelinek 2015-06-23 12:50:17 UTC
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.

Comment 8 errata-xmlrpc 2015-11-19 09:35:57 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


Note You need to log in before you can comment on or make changes to this bug.