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:
|
||||
source, target = self._mounts.pop(-1)
|
||||
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():
|
||||
netif.shutdown()
|
||||
try:
|
||||
|
@ -105,9 +102,7 @@ class SimpleLxcNode(PyCoreNode):
|
|||
except OSError:
|
||||
pass
|
||||
self._netif.clear()
|
||||
#del self.session
|
||||
# print "XXX del vnodeclient:", self.vnodeclient
|
||||
del self.vnodeclient
|
||||
self.vnodeclient.close()
|
||||
self.up = False
|
||||
|
||||
def cmd(self, args, wait = True):
|
||||
|
|
|
@ -43,6 +43,10 @@ class VnodeClient(object):
|
|||
else:
|
||||
return True
|
||||
|
||||
def close(self):
|
||||
if USE_VCMD_MODULE:
|
||||
self.cmdchnl.close()
|
||||
|
||||
def cmd(self, args, wait = True):
|
||||
''' Execute a command on a node and return the status (return code).
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue