diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-11-15 10:52:49 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-11-15 10:53:26 +0000 |
commit | 080b0394d24c52ffcf752630605a714bfe0fb8dd (patch) | |
tree | 7bdc4b81a7bb58dc6972b4cc4696be95b35f77ca /resources/libraries/python/ContainerUtils.py | |
parent | 14fe26e6a184ce150c9372e52e48d1d8640044b4 (diff) |
FIX: LXC Container directory initialization
Change-Id: I7d2f81e03316410073b2b3ff7d6d754f5ac90df7
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python/ContainerUtils.py')
-rw-r--r-- | resources/libraries/python/ContainerUtils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py index 61409ff908..b552e4d9e6 100644 --- a/resources/libraries/python/ContainerUtils.py +++ b/resources/libraries/python/ContainerUtils.py @@ -651,6 +651,8 @@ class LXC(ContainerEngine): '{options} 0 0'.format( host_dir=host_dir, guest_dir=guest_dir[1:], options=options) + self.container.ssh.exec_command_sudo( + "sh -c 'mkdir -p {host_dir}'".format(host_dir=host_dir)) ret, _, _ = self.container.ssh.exec_command_sudo( "sh -c 'echo \"{e}\" >> /var/lib/lxc/{c.name}/config'". format(e=entry, c=self.container)) |