There's more...
When we call crm resource migrate, Pacemaker merely makes a simple configuration change. As the PGServer resource is running on pg1 and we set stickiness to 100, any score higher than that will override the current (and preferred) node.
When we ask for a migration, Pacemaker sets the node score for pg2 at infinity, the highest value possible. The next time the resource target evaluation system runs, it sees that the score has changed and starts reorganizing the cluster to match. It's actually quite elegant. Unfortunately, it means that we need to remove the score or we could be in trouble later.
When we unmigrate the PGServer group, Pacemaker removes the infinite score assigned to pg2, leaving it with a regular score of
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access