Description: fixes a bug on cloned and master/slave resources handling during
 failures.
 .
Author: gustavo panizzo <gfa@zumbi.com.ar>

Origin: upstream, https://github.com/beekhof/pacemaker/commit/6a48a8b
Bug-Debian: 
Forwarded: not-needed
Last-Update: <2013-04-16>

--- pacemaker-1.1.7.orig/lib/pengine/utils.c
+++ pacemaker-1.1.7/lib/pengine/utils.c
@@ -544,7 +544,6 @@ unpack_operation(action_t * action, xmlN
 
     unpack_instance_attributes(data_set->input, xml_obj, XML_TAG_ATTR_SETS,
                                NULL, action->meta, NULL, FALSE, data_set->now);
-
     g_hash_table_remove(action->meta, "id");
 
     class = g_hash_table_lookup(action->rsc->meta, "class");
@@ -785,12 +784,19 @@ find_rsc_op_entry(resource_t * rsc, cons
             }
 
             match_key = generate_op_key(rsc->id, name, number);
-
             if (safe_str_eq(key, match_key)) {
                 op = operation;
             }
             crm_free(match_key);
 
+            if(rsc->clone_name) {
+                match_key = generate_op_key(rsc->clone_name, name, number);
+                if (safe_str_eq(key, match_key)) {
+                    op = operation;
+                }
+                crm_free(match_key);
+            }
+
             if (op != NULL) {
                 crm_free(local_key);
                 return op;
