Bug 1006465

Summary: Orphaned pacemaker container resources can cause invalid transitions and resource failure
Product: Red Hat Enterprise Linux 7 Reporter: David Vossel <dvossel>
Component: pacemakerAssignee: David Vossel <dvossel>
Status: CLOSED CURRENTRELEASE QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: cluster-maint, djansa, dvossel, fdinitto, mnovacek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pacemaker-1.1.10-15.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 10:36:15 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 David Vossel 2013-09-10 16:25:20 UTC
Description of problem:
Orphaned Container Resources  (container resources deleted from the CIB before being stopped) can cause invalid pacemaker transition and resource failures.

How reproducible:

50% of the time. This can be completely random.  Basically if we get lucky, the resources within the orphaned container get stopped before the container is shut down, but there is nothing in the policy engine that strictly enforces this to happen in the correct order.

Steps to Reproduce:
1. create a Container resource.
2. place resources within the container.
3. delete container resource from cib.

Actual results:

The container resource might get torn down before the resources within it, which will cause resources to fail when they shouldn't.... This entire problem occurs because it is impossible to stop a resource living within the container after the container is stopped.  The policy engine must enforce the correct order during container shutdown.

Expected results:

Orphaned container resources are not stopped until all the resources running within them are stopped first.

Additional info:

This has already been fixed upstream. These 3 upstream patches are required to resolve this.

https://github.com/davidvossel/pacemaker/commit/8b5ea1957e3281fa18940f4beb496482948f9dca

https://github.com/davidvossel/pacemaker/commit/015f12fabd4d286add6b7e711108bf235485b552

https://github.com/davidvossel/pacemaker/commit/65ef2c7d8d931a149db3cf8be41225410a27e182

Comment 3 michal novacek 2014-03-28 14:01:34 UTC
I have verified that the resource residing inside the container is correctly
relocated when container is removed.

duck-03# rpm -q resource-agents
resource-agents-3.9.5-26.el7.x86_64

duck-03# pcs status
...
Online: [ duck-03 ]
Containers: [ duck-03-node01:R-duck-03-node01-lxc ]

Full list of resources:

 virt-fencing   (stonith:fence_ipmilan):        Started duck-03 
 le-dummy       (ocf::heartbeat:Dummy): Started duck-03-node01 
 R-duck-03-node01-lxc   (ocf::heartbeat:VirtualDomain): Started duck-03 
...

duck-03# pcs resource delete R-duck-03-node01-lxc
Removing Constraint - location-R-duck-03-node01-lxc-duck-03-INFINITY
Attempting to stop: R-duck-03-node01-lxc...Stopped
Deleting Resource - R-duck-03-node01-lxc

duck-03# pcs status
...
Online: [ duck-03 ]

Full list of resources:

 virt-fencing   (stonith:fence_ipmilan):        Started duck-03 
 le-dummy       (ocf::heartbeat:Dummy): Started duck-03

Comment 4 Ludek Smid 2014-06-13 10:36:15 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.