+3
−19
+37
−15
Loading
I have considered trying to parse the output of gnt-node migrate but
it's a big unknown at the moment. I remember (and found in the Ganeti
source, in lib/cmdlib/instance_migrate.py) a message like:
Instance's disk layout '%s' does not allow migrations
... but that shows the disk name, not the instance name, so we can't
just reuse that.
Instead, we handle failures from `gnt-node migrate` by assuming it's a
plain instance that crashed the migrate and shift to stopping that
instance. We still crash if there are no plain instances, and
there *is* now a possibility that we reboot a host even if a migrate
failed on a DRBD host, but that's a risk I'm willing to take to
simplify things.
The alternative would be to migrate hosts by hand, but I feel more
iffy about this, because it requires multiple round-trips over SSH,
something which could fail if we need user interaction (e.g. Yubikey
press).
So this is getting uglier, unfortunately, but I am hoping it also
happens to work.