File bug-977675_pacemaker-pengine-respect-asymmetrical-ordering.patch of Package pacemaker.9287

From 0c7571844bac080cc4e3c999bf9dad6ab3fcb5ff Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Thu, 28 Apr 2016 16:35:19 +0200
Subject: [PATCH] Fix: pengine: Respect asymmetrical ordering when trying to
 move resources

---
 pengine/native.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pengine/native.c b/pengine/native.c
index ecc83863d5..a6598868dd 100644
--- a/pengine/native.c
+++ b/pengine/native.c
@@ -1837,7 +1837,12 @@ native_update_actions(action_t * first, action_t * then, node_t * node, enum pe_
         } else if ((then_rsc_role == RSC_ROLE_STOPPED) && safe_str_eq(then->task, RSC_STOP)) {
             /* ignore... if 'then' is supposed to be stopped after 'first', but
              * then is already stopped, there is nothing to be done when non-symmetrical.  */
-        } else if ((then_rsc_role == RSC_ROLE_STARTED) && safe_str_eq(then->task, RSC_START)) {
+        } else if ((then_rsc_role >= RSC_ROLE_STARTED)
+                   && safe_str_eq(then->task, RSC_START)
+                   && then->node
+                   && then_rsc->running_on
+                   && g_list_length(then_rsc->running_on) == 1
+                   && then->node->details == ((node_t *) then_rsc->running_on->data)->details) {
             /* ignore... if 'then' is supposed to be started after 'first', but
              * then is already started, there is nothing to be done when non-symmetrical.  */
         } else if (!(first->flags & pe_action_runnable)) {
openSUSE Build Service is sponsored by