After having successfully completed T203963, we could build on the stuff created for that task to create a cookbook that empties a node for maintenance
- Connects to the ganeti cluster master (figures it out via gnt-cluster getmaster if necessary)
- Live migrates all running VMs on said node (gnt-node evacuate -p $node should be good)
- Verifies the above has completed successfully
- Fails over VMs for which the host is primary but are not running (gnt-node failover)
- Moves secondary VMs (if requested) from the host (gnt-node evacuate -s)
A variation of the above that would also be helpful (probably as it's own cookbook) would be:
- Do the above to a machine
- Reboot it
- wait for it to come back online
- run gnt-cluster verify-disks to force DBRD pair syncing with the rest of the cluster
- Proceed to the next node
Aka rolling reboot