Skip to content

Commit

Permalink
Fix: rhbz#1527072 - Correctly observe colocation constraints with bun…
Browse files Browse the repository at this point in the history
…dles in the Master role
  • Loading branch information
beekhof committed Jan 22, 2018
1 parent dc404dc commit 373c057
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pengine/container.c
Expand Up @@ -486,10 +486,18 @@ container_rsc_colocation_rh(resource_t * rsc_lh, resource_t * rsc, rsc_colocatio
} else {
node_t *chosen = tuple->docker->fns->location(tuple->docker, NULL, FALSE);

if (chosen != NULL && is_set_recursive(tuple->docker, pe_rsc_block, TRUE) == FALSE) {
pe_rsc_trace(rsc, "Allowing %s: %s %d", constraint->id, chosen->details->uname, chosen->weight);
allocated_rhs = g_list_prepend(allocated_rhs, chosen);
if (chosen == NULL || is_set_recursive(tuple->docker, pe_rsc_block, TRUE)) {
continue;
}
if(constraint->role_rh >= RSC_ROLE_MASTER && tuple->child == NULL) {
continue;
}
if(constraint->role_rh >= RSC_ROLE_MASTER && tuple->child->next_role < RSC_ROLE_MASTER) {
continue;
}

pe_rsc_trace(rsc, "Allowing %s: %s %d", constraint->id, chosen->details->uname, chosen->weight);
allocated_rhs = g_list_prepend(allocated_rhs, chosen);
}
}

Expand Down

0 comments on commit 373c057

Please sign in to comment.