summaryrefslogtreecommitdiff
path: root/vmdb/plugins/cache_rootfs_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'vmdb/plugins/cache_rootfs_plugin.py')
-rw-r--r--vmdb/plugins/cache_rootfs_plugin.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/vmdb/plugins/cache_rootfs_plugin.py b/vmdb/plugins/cache_rootfs_plugin.py
index c7ebb6d..cdbd3e6 100644
--- a/vmdb/plugins/cache_rootfs_plugin.py
+++ b/vmdb/plugins/cache_rootfs_plugin.py
@@ -28,7 +28,7 @@ class CacheRootFSPlugin(vmdb.Plugin):
class MakeCacheStepRunner(vmdb.StepRunnerInterface):
def get_key_spec(self):
- return {"cache-rootfs": str, "options": "--one-file-system"}
+ return {"cache-rootfs": str, "options": "--one-file-system", "force": False}
def run(self, values, settings, state):
fs_tag = values["cache-rootfs"]
@@ -49,7 +49,7 @@ class MakeCacheStepRunner(vmdb.StepRunnerInterface):
vmdb.progress("caching rootdir {}".format(rootdir))
vmdb.progress("caching relative {}".format(dirs))
- if not os.path.exists(tar_path):
+ if values["force"] or not os.path.exists(tar_path):
vmdb.runcmd(["tar"] + opts + ["-C", rootdir, "-caf", tar_path] + dirs)
def _find_cacheable_mount_points(self, tags, rootdir):