From a4fa532d6c1091caf94d64c95c5625738aa1ebf3 Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Wed, 12 Aug 2015 13:36:27 +0200 Subject: [PATCH] fix resource relocation of globally-unique clones --- pcs/test/test_utils.py | 57 +++++++++++++++++++++++++++++++++++++++++++++++--- pcs/utils.py | 9 +++++++- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/pcs/utils.py b/pcs/utils.py index d61ff44..740ff04 100644 --- a/pcs/utils.py +++ b/pcs/utils.py @@ -2044,8 +2044,15 @@ def get_resources_location_from_operations(cib_dom, resources_operations): continue long_id = res_op["long_id"] if long_id not in locations: + # Move clone instances as if they were non-cloned resources, it + # really works with current pacemaker (1.1.13-6). Otherwise there + # is probably no way to move them other then setting their + # stickiness to 0. + res_id = res_op["id"] + if ":" in res_id: + res_id = res_id.split(":")[0] id_for_constraint = validate_constraint_resource( - cib_dom, res_op["id"] + cib_dom, res_id )[2] if not id_for_constraint: continue -- 1.9.1