pcs/SOURCES/fix-translating-resource-ro...

26 lines
910 B
Diff

From f759872276ed8ff04bbf05010c18bbe4d1abdb11 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Tue, 1 Feb 2022 16:10:35 +0100
Subject: [PATCH 2/2] fix translating resource roles in colocation constraints
---
pcs/lib/xml_tools.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcs/lib/xml_tools.py b/pcs/lib/xml_tools.py
index 07752f92..6a652fd1 100644
--- a/pcs/lib/xml_tools.py
+++ b/pcs/lib/xml_tools.py
@@ -66,7 +66,7 @@ def export_attributes(
result = {str(key): str(value) for key, value in element.attrib.items()}
if not with_id:
result.pop("id", None)
- for role_name in ("role", "rsc-role"):
+ for role_name in ("role", "rsc-role", "with-rsc-role"):
if role_name in result:
result[role_name] = pacemaker.role.get_value_primary(
const.PcmkRoleType(result[role_name].capitalize())
--
2.34.1