SimpleLxcNode: Remove unused umount method
The umount method was used to remove private mount points before tearing down a node. Since non-persistend mount namespaces are automatically cleaned up by he kernel, this method is now unused. Signed-off-by: Gabriel Somlo <glsomlo@cert.org>
This commit is contained in:
parent
a5ae485fa6
commit
6d3d17f470
1 changed files with 3 additions and 18 deletions
|
@ -117,11 +117,9 @@ class SimpleLxcNode(PyCoreNode):
|
||||||
if not self.up:
|
if not self.up:
|
||||||
return
|
return
|
||||||
|
|
||||||
# unmount all targets
|
# unmount all targets (NOTE: non-persistent mount namespaces are
|
||||||
while self._mounts:
|
# removed by the kernel when last referencing process is killed)
|
||||||
source, target = self._mounts.pop(-1)
|
self._mounts = []
|
||||||
# Mount namespaces automatically removed when last process exits!
|
|
||||||
#self.umount(target)
|
|
||||||
|
|
||||||
# shutdown all interfaces
|
# shutdown all interfaces
|
||||||
for netif in self.netifs():
|
for netif in self.netifs():
|
||||||
|
@ -251,19 +249,6 @@ class SimpleLxcNode(PyCoreNode):
|
||||||
except IOError:
|
except IOError:
|
||||||
logger.exception("mounting failed for %s at %s", source, target)
|
logger.exception("mounting failed for %s at %s", source, target)
|
||||||
|
|
||||||
def umount(self, target):
|
|
||||||
"""
|
|
||||||
Unmount a target directory.
|
|
||||||
|
|
||||||
:param str target: target directory to unmount
|
|
||||||
:return: nothing
|
|
||||||
"""
|
|
||||||
logger.info("unmounting: %s", target)
|
|
||||||
try:
|
|
||||||
self.cmd([constants.UMOUNT_BIN, "-n", "-l", target])
|
|
||||||
except IOError:
|
|
||||||
logger.exception("unmounting failed for %s" % target)
|
|
||||||
|
|
||||||
def newifindex(self):
|
def newifindex(self):
|
||||||
"""
|
"""
|
||||||
Retrieve a new interface index.
|
Retrieve a new interface index.
|
||||||
|
|
Loading…
Add table
Reference in a new issue