Determine the current master instance dynamically and re-configure the services
In case the fail-over took place and the master is now one of the relicas the role need to determine the new master instance dynamically and re-configure the services accordingly, otherwise the original master will bet set as master again.