Revision f5118ade
ID | f5118ade209718ec501e3ae63b654358606eb06b |
Add a node powercycle command
This (somewhat big) patch adds support for remotely rebooting the nodes
via whatever support the hypervisor has for such a concept.
For KVM/fake (and containers in the future) this just uses sysrq plus a
‘reboot’ call if the sysrq method failed. For Xen, it first tries the
above, and then Xen-hypervisor reboot (we first try sysrq since that
just requires opening a file handle, whereas xen reboot means launching
an external utility).
The user interface is:
- gnt-node powercycle node5
Are you sure you want to hard powercycle node node5?
y/[n]/?: y
Reboot scheduled in 5 seconds
The node reboots hopefully after sending the reply. In case the clock is
broken, “time.sleep(5)” might take ages (but then I suspect SSL
negotiation wouldn't work).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Files
- added
- modified
- copied
- renamed
- deleted