Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix: pengine: disable migration for versioned resources
  • Loading branch information
igor-tsiglyar committed Aug 4, 2016
1 parent 551f898 commit eae8aee
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/pengine/complex.c
Expand Up @@ -524,15 +524,19 @@ common_unpack(xmlNode * xml_obj, resource_t ** rsc,
}

value = g_hash_table_lookup((*rsc)->meta, XML_OP_ATTR_ALLOW_MIGRATE);
if (crm_is_true(value)) {
if (crm_is_true(value) && xml_has_children((*rsc)->versioned_parameters)) {
pe_rsc_trace((*rsc), "Migration is disabled for resources with versioned parameters");
} else if (crm_is_true(value)) {
set_bit((*rsc)->flags, pe_rsc_allow_migrate);
} else if (value == NULL && baremetal_remote_node) {
} else if (value == NULL && baremetal_remote_node &&
!xml_has_children((*rsc)->versioned_parameters)) {
/* by default, we want baremetal remote-nodes to be able
* to float around the cluster without having to stop all the
* resources within the remote-node before moving. Allowing
* migration support enables this feature. If this ever causes
* problems, migration support can be explicitly turned off with
* allow-migrate=false. */
* allow-migrate=false.
* We don't support migration for versioned resources, though. */
set_bit((*rsc)->flags, pe_rsc_allow_migrate);
}

Expand Down

0 comments on commit eae8aee

Please sign in to comment.