Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1198274 - pcsd: don't automatically use --force everytime a resource is being removed
pcsd: don't automatically use --force everytime a resource is being removed
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs (Show other bugs)
7.1
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Tomas Jelinek
cluster-qe@redhat.com
Steven J. Levine
: Regression
Depends On:
Blocks: 1205796
  Show dependency treegraph
 
Reported: 2015-03-03 12:17 EST by Radek Steiger
Modified: 2015-11-19 04:35 EST (History)
3 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-19 04:35:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2290 normal SHIPPED_LIVE Moderate: pcs security, bug fix, and enhancement update 2015-11-19 04:43:53 EST

  None (edit)
Description Radek Steiger 2015-03-03 12:17:24 EST
> 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 10:32:04 EDT
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 08:50:17 EDT
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 04:35:57 EST
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.