forked from ClusterLabs/pacemaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug: tools: Clear all prefer constraints when performing a move
A move is implemented in terms of perfer constraints. If those constraints contain something like a lifetime expression, and older prefer constraints are not cleared out, the result is a mess. The XML that is attempted to insert into the CIB will contain both the older constraint and then the new lifetime expression as sub-nodes of that constraint. This is invalid, so the CIB will throw it out. The fix is to make sure there are no prefer constraints for any nodes when a move is done. Most ban constraints are left alone, because they may still be valid - you may want to move a resource to one node while preserving the ban on another node. Taking care of this is the bulk of the complexity in this patch. One further note - any ban constraints on the destination still need to be removed. Having both a ban and a prefer constraint on the same node may technically be valid XML, but doesn't make any sense. See rhbz#1648620
- Loading branch information
Showing
4 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters