Is it possible for the rgmanager scripts to distinguish between a managed relocation of a service from a relocation caused by the failure of the current service ?
In the event of a relocation due to failure, I want to perform some reconfiguration of the replacement - in this case, updating some transaction counters in a MySQL server - before it takes over. I can do this using a script resource. However, if the relocation is a managed administration action, I don't want to do this reconfiguration.
One approach I am considering is to create some sort of sentinel service, which would be allowed to just fail if the node it is currently bound to fails. Under a managed relocation, the sentinel could be relocated first, and then the script service relocated. The script could then check whether the sentinel was bound to the same node, and if so, not perform the reconfiguration.
It sounds a bit convoluted though: is there an easier way ?