File pacemaker-pengine-test-clone.patch of Package pacemaker.14737

commit feeb6e14e390d9cd36c9b5f86d0348e595207b93
Author: Andrew Beekhof <andrew@beekhof.net>
Date:   Tue Feb 21 12:42:47 2017 +1100

    PE: Correctly test for clone functionality

diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c
index f3a7ebc03..58b073146 100644
--- a/lib/pengine/unpack.c
+++ b/lib/pengine/unpack.c
@@ -1803,7 +1803,7 @@ unpack_find_resource(pe_working_set_t * data_set, node_t * node, const char *rsc
         parent = uber_parent(rsc);
     }
 
-    if (parent && parent->variant > pe_group) {
+    if (parent && parent->variant >= pe_clone) {
         if (is_not_set(parent->flags, pe_rsc_unique)) {
             char *base = clone_strip(rsc_id);
 
diff --git a/pengine/constraints.c b/pengine/constraints.c
index eca4c25c2..53e008b36 100644
--- a/pengine/constraints.c
+++ b/pengine/constraints.c
@@ -153,7 +153,7 @@ get_ordering_type(xmlNode * xml_obj)
                 kind_e = pe_order_kind_optional;
             }
 
-            /* } else if(rsc_then->variant == pe_native && rsc_first->variant > pe_group) { */
+            /* } else if(rsc_then->variant == pe_native && rsc_first->variant >= pe_clone) { */
             /*     kind_e = pe_order_kind_optional; */
         }
 
diff --git a/pengine/utilization.c b/pengine/utilization.c
index db41b2113..e3996e2d0 100644
--- a/pengine/utilization.c
+++ b/pengine/utilization.c
@@ -317,7 +317,7 @@ find_colocated_rscs(GListPtr colocated_rscs, resource_t * rsc, resource_t * orig
             continue;
         }
 
-        if (rsc_lh->variant <= pe_group && rsc->variant > pe_group) {
+        if (rsc_lh->variant <= pe_group && rsc->variant >= pe_clone) {
             /* We do not know if rsc_lh will be colocated with orig_rsc in this case */
             continue;
         }
diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c
index 4f3a2fc66..67640c12a 100644
--- a/tools/crm_resource_runtime.c
+++ b/tools/crm_resource_runtime.c
@@ -1109,7 +1109,7 @@ cli_resource_restart(resource_t * rsc, const char *host, int timeout_ms, cib_t *
     attr_set_type = XML_TAG_META_SETS;
 
     rsc_id = strdup(rsc->id);
-    if(rsc->variant > pe_group) {
+    if(rsc->variant >= pe_clone) {
         is_clone = TRUE;
     }
 
@@ -1624,7 +1624,7 @@ cli_resource_move(const char *rsc_id, const char *host_name, cib_t * cib, pe_wor
             count = g_list_length(rsc->running_on);
         }
 
-    } else if (rsc->variant > pe_group) {
+    } else if (rsc->variant >= pe_clone) {
         count = g_list_length(rsc->running_on);
 
     } else if (g_list_length(rsc->running_on) > 1) {
openSUSE Build Service is sponsored by