From 9ddb7907e2c3f803331700a667c7ec91b4d5db74 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 26 May 2017 16:06:00 -0500 Subject: [PATCH 1/2] Fix: libpe_status: set parent for bundle components This allows the bundle components to inherit meta-attributes set on the bundle resource. --- lib/pengine/container.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/pengine/container.c b/lib/pengine/container.c index f93a60f..836b482 100644 --- a/lib/pengine/container.c +++ b/lib/pengine/container.c @@ -177,7 +177,7 @@ create_ip_resource( // TODO: Other ops? Timeouts and intervals from underlying resource? - if (common_unpack(xml_ip, &tuple->ip, NULL, data_set) == false) { + if (common_unpack(xml_ip, &tuple->ip, parent, data_set) == false) { return FALSE; } @@ -328,11 +328,10 @@ create_docker_resource( // TODO: Other ops? Timeouts and intervals from underlying resource? - if (common_unpack(xml_docker, &tuple->docker, NULL, data_set) == FALSE) { + if (common_unpack(xml_docker, &tuple->docker, parent, data_set) == FALSE) { return FALSE; } parent->children = g_list_append(parent->children, tuple->docker); - tuple->docker->parent = parent; return TRUE; } @@ -408,7 +407,7 @@ create_remote_resource( nodeid = NULL; id = NULL; - if (common_unpack(xml_remote, &tuple->remote, NULL, data_set) == FALSE) { + if (common_unpack(xml_remote, &tuple->remote, parent, data_set) == FALSE) { return FALSE; } -- 1.8.3.1 From 7033ac1e65e9e3e70d8f365c71e71069f446c3d9 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 26 May 2017 17:22:48 -0500 Subject: [PATCH 2/2] Low: libpe_status: propagate multiple-active=block for bundles Comparable to groups, if one of a bundle's components is found multiply active and the bundle has multiple-active=block, block everything in the bundle. --- lib/pengine/native.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/pengine/native.c b/lib/pengine/native.c index da9e344..f785b90 100644 --- a/lib/pengine/native.c +++ b/lib/pengine/native.c @@ -91,10 +91,11 @@ native_add_running(resource_t * rsc, node_t * node, pe_working_set_t * data_set) clear_bit(rsc->flags, pe_rsc_managed); set_bit(rsc->flags, pe_rsc_block); - /* If the group that the resource belongs to is configured with multiple-active=block, */ - /* block the whole group. */ + /* If the resource belongs to a group or bundle configured with + * multiple-active=block, block the entire entity. + */ if (rsc->parent - && rsc->parent->variant == pe_group + && (rsc->parent->variant == pe_group || rsc->parent->variant == pe_container) && rsc->parent->recovery_type == recovery_block) { GListPtr gIter = rsc->parent->children; -- 1.8.3.1