Artificial intelligent assistant

Pacemaker: migrate resource without adding a "prefer" line in config Using pacemaker in a 2 nodes master/slave configuration. In order to perform some tests, we want to switch the master role from _node1_ to _node2_ , and vice-versa. For instance if the current master is _node1_ , doing # crm resource migrate r0 node2 does indeed move the resource to _node2_. Then, ideally, # crm resource migrate r0 node1 would migrate back to _node1_. The problem is that _migrate_ added a line in the configuration to perform the switch location cli-prefer-r0 r0 role=Started inf: node2 and in order to migrate back I have first to remove that line... Is there a better way to switch master from one node to the other?

I know this bit old; but it seems like no one answered this satisfactorily, and the requester never posted if his problem was solved or not. So here is an explanation.

When you perform:


# crm resource migrate r0 node2


a `cli-prefer-*` rule is created.

Now when you want to move the r0 back to node1, you don't do:


# crm resource migrate r0 node1


but you perform:


# crm resource unmigrate r0


Using `umigrate` or `unmove` gets rid of the `cli-prefer-*` rule automatically.

If you try to delete this rule manually in cluster config, really bad things happen in cluster, or at least bad things happened in my case.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 6c15a6cffd152c7c04bb2d80bd77eb68