daemon: Explicitly close vnode clients at shutdown.
This commit is contained in:
parent
5a58978f79
commit
ef85995cc6
2 changed files with 5 additions and 6 deletions
|
@ -90,9 +90,6 @@ class SimpleLxcNode(PyCoreNode):
|
||||||
while self._mounts:
|
while self._mounts:
|
||||||
source, target = self._mounts.pop(-1)
|
source, target = self._mounts.pop(-1)
|
||||||
self.umount(target)
|
self.umount(target)
|
||||||
#print "XXX del vnodeclient:", self.vnodeclient
|
|
||||||
# XXX XXX XXX this causes a serious crash
|
|
||||||
#del self.vnodeclient
|
|
||||||
for netif in self.netifs():
|
for netif in self.netifs():
|
||||||
netif.shutdown()
|
netif.shutdown()
|
||||||
try:
|
try:
|
||||||
|
@ -105,9 +102,7 @@ class SimpleLxcNode(PyCoreNode):
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
self._netif.clear()
|
self._netif.clear()
|
||||||
#del self.session
|
self.vnodeclient.close()
|
||||||
# print "XXX del vnodeclient:", self.vnodeclient
|
|
||||||
del self.vnodeclient
|
|
||||||
self.up = False
|
self.up = False
|
||||||
|
|
||||||
def cmd(self, args, wait = True):
|
def cmd(self, args, wait = True):
|
||||||
|
|
|
@ -43,6 +43,10 @@ class VnodeClient(object):
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
if USE_VCMD_MODULE:
|
||||||
|
self.cmdchnl.close()
|
||||||
|
|
||||||
def cmd(self, args, wait = True):
|
def cmd(self, args, wait = True):
|
||||||
''' Execute a command on a node and return the status (return code).
|
''' Execute a command on a node and return the status (return code).
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue