]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/qemu: avoid adding duplicated entries to /etc/exports
authorYan, Zheng <zyan@redhat.com>
Mon, 31 Aug 2015 14:25:53 +0000 (22:25 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 31 Aug 2015 14:27:38 +0000 (22:27 +0800)
try deleting leftover entries for previous job

Fixes: #12806
Signed-off-by: Yan, Zheng <zyan@redhat.com>
tasks/qemu.py

index bcd79caa64f588d339db9ade2781d083654fd563..a9bb11feb9b6018e3afdf22617cbe66a586808e5 100644 (file)
@@ -180,6 +180,9 @@ def _setup_nfs_mount(remote, client, mount_dir):
     export = "{dir} *(rw,no_root_squash,no_subtree_check,insecure)".format(
         dir=export_dir
     )
+    remote.run(args=[
+        'sudo', 'sed', '-i', '/^\/export\//d', "/etc/exports",
+    ])
     remote.run(args=[
         'echo', export, run.Raw("|"),
         'sudo', 'tee', '-a', "/etc/exports",