2010/4/19 Iustin Pop <[email protected]>: > From: Iustin Pop <[email protected]> > > Currently, when making an instance shutdown call, the decision on > whether to actually do the shutdown or simply returning is made in > backend.py, by checking whether the instance is running correctly. > However, for some hypervisors, the running/stopped state is not a > boolean on/off state but might involve an intermediate step where some > resources are allocated/used on the node. Examples could be: > > - mounted directory for chroot hypervisor > - KVM runtime files > - bridge setup if not cleanup up by the hypervisor > - etc. > > Currently what happens is that backend sees the instance down, and thus > doesn't call the hypervisor method anymore, thus leaving the node in an > unclean state. > > In order to fix this, we need to change the semantics of shutdown as > such: > > - backend doesn't do any checks anymore, but simply calls into the > appropriate hypervisor's StopInstance method > - all hypervisors must accept this call whatever the state of the > instance, and do the appropriate work based on the instance/node state > - success of shutdown is no longer signified by instance not being in > the list of running instances, but by the success (no exceptions > raised) of the StopInstance call > - retry logic in backend is simplified to remove the is running checks > > The patch: > > - changes backend > - changes Xen and fake hypervisors to accept not-running instances > - changes chroot hypervisor to run the unmount steps even if the > instance wasn't running before > - fixes an unrelated bug in chroot related to GetInstanceInfo > --- > Note: I tested this only briefly. Will do more tests (burnin, etc.) before > committing.
LGTM -- Subscription settings: http://groups.google.com/group/ganeti-devel/subscribe?hl=en
