Improve export and fix export-on-norun bug
authorGuido Trotter <ultrotter@google.com>
Wed, 2 Apr 2008 18:00:13 +0000 (18:00 +0000)
committerGuido Trotter <ultrotter@google.com>
Wed, 2 Apr 2008 18:00:13 +0000 (18:00 +0000)
commit94d5cfe46dbdaf0aa3d556d8d04e3495a4eccead
tree3a22bf35f4b93dbb988dc7250768f9c7234f3ba4
parent272ccd6d54e0716a7b155dab07b26eb54564662b
Improve export and fix export-on-norun bug

Currently gnt-backup export chains the ShutdownInstance and StartupInstance
opcodes to itself. This works but (a) it's suboptimal, because there's no need
to deactivate the instance's disks as we are about to restart it anyway, and
(b) doesn't take care of instances which are already down (and should be). This
patch takes care of this by just calling the shutdown rpc function instead of
the whole opcode, and just starting up the instance if it's configured as up in
the first place.

Reviewed-by: imsnah
lib/cmdlib.py