Allow starting machines formerly running on a failed node
vnc_port and node reset should be both an option of emergency_change_state.
Draft:
from vm.models import Instance
from vm.models import Node
node_name = "xmega4"
node = Node.objects.get(name=node_name)
node.disable()
insts=Instance.objects.filter(node=node) # , name__startswith="Meta")
for i in insts:
i.vnc_port = None
i.node = None
i.save()
for i in insts:
i.emergency_change_state(system=True)
for i in insts:
i.deploy(system=True)
-
-
Status changed to closed by commit a431c8
Toggle commit list
Please
register
or
sign in
to comment