LGTM, thanks! Nits to follow.
On Thu, Jul 24, 2014 at 2:31 AM, Yuto KAWAMURA(kawamuray) < [email protected]> wrote: > Use _IsInstanceAlive instead of 'name in self.ListInstances()'. > It is more fast and accurate because we should kill LXC container if > s/more fast and accurate/faster and more accurate/ ... kill an LXC ... > here is alive process even if its rootfs is not exists. > Possible rewrite: processes are running within, even if its rootfs does not exist. > > Signed-off-by: Yuto KAWAMURA(kawamuray) <[email protected]> > --- > lib/hypervisor/hv_lxc.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/hypervisor/hv_lxc.py b/lib/hypervisor/hv_lxc.py > index 4d358c0..037d3b7 100644 > --- a/lib/hypervisor/hv_lxc.py > +++ b/lib/hypervisor/hv_lxc.py > @@ -453,7 +453,7 @@ class LXCHypervisor(hv_base.BaseHypervisor): > if name is None: > name = instance.name > > - if name in self.ListInstances(): > + if self._IsInstanceAlive(instance.name): > lxc_stop_cmd = ["lxc-stop", "-n", name] > > if force: > -- > 1.8.5.5 > > Hrvoje Ribicic Ganeti Engineering Google Germany GmbH Dienerstr. 12, 80331, München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores Steuernummer: 48/725/00206 Umsatzsteueridentifikationsnummer: DE813741370
