summaryrefslogtreecommitdiff
path: root/morphlib/plugins
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-02-05 13:51:23 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-02-06 12:57:49 +0000
commit9f5b2d64071ab8416487b5fc265908a511a9bf68 (patch)
treec7804a83b66ab4544f74dfbfc5ca7b5adf97c073 /morphlib/plugins
parent3f7e38a7f2721a404ebbfb130b51fa639a9e7360 (diff)
downloadmorph-9f5b2d64071ab8416487b5fc265908a511a9bf68.tar.gz
Overlayfs is new in version 3.18 of the kernel, so add support for a different implementation of a union/overlay filesystem in order to allow morph to work on older kernels.
Diffstat (limited to 'morphlib/plugins')
-rw-r--r--morphlib/plugins/deploy_plugin.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py
index 4f78d126..a4895106 100644
--- a/morphlib/plugins/deploy_plugin.py
+++ b/morphlib/plugins/deploy_plugin.py
@@ -580,12 +580,12 @@ class DeployPlugin(cliapp.Plugin):
msg='System unpacked at %(system_tree)s',
system_tree=system_tree)
- options = '-olowerdir=%s,upperdir=%s,workdir=%s' % \
- (system_tree, overlay_dir, work_dir)
- morphlib.fsutils.mount(self.app.runcmd,
- 'overlay-deploy-%s' % artifact.name,
- deploy_tree, fstype='overlay',
- options=options)
+ morphlib.fsutils.overlay_mount(self.app.runcmd,
+ 'overlay-deploy-%s' %
+ artifact.name,
+ deploy_tree, system_tree,
+ overlay_dir, work_dir,
+ self.app.settings)
self.app.status(
msg='Writing deployment metadata file')
@@ -598,12 +598,12 @@ class DeployPlugin(cliapp.Plugin):
sort_keys=True, encoding='unicode-escape')
return deploy_tree
except Exception:
- shutil.rmtree(system_tree)
- shutil.rmtree(overlay_dir)
- shutil.rmtree(work_dir)
if deploy_tree and os.path.exists(deploy_tree):
morphlib.fsutils.unmount(self.app.runcmd, deploy_tree)
shutil.rmtree(deploy_tree)
+ shutil.rmtree(system_tree)
+ shutil.rmtree(overlay_dir)
+ shutil.rmtree(work_dir)
raise
def run_deploy_commands(self, deploy_tempdir, env, artifact, root_repo_dir,