« Previous | Next » 

Revision f5118ade

IDf5118ade209718ec501e3ae63b654358606eb06b
Parent d48031a1
Child 4501a443

Added by Iustin Pop almost 15 years ago

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:

  1. 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 <>
Reviewed-by: Guido Trotter <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences