I've got a failover setup. How do I rename my head nodes?
The following works even if you are exchanging names:
Eg: head 1 is a white box and head 2 is a black box.
But their names got swapped around during setup by mistake, so that head 1 is wrongly called blackbox and head 2 is wrongly called whitebox
The swap can be corrected with these commands run on the active. Suppose the active is blackbox:
- using cmha-setup: undo failover setup,
- using cmsh: change hostname of only head to the desired name from blackbox to whitebox. This must be done from within CMDaemon to get configurations changed appropriately. Eg: cmsh -c "device use master; set hostname whitebox commit". The head node (which is incidentally the only head node since failover was undone) is then rebooted after this to commit the changes.
- using cmha-setup: run failover setup on the box that is to be whitebox