summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2019-05-17 15:27:14 +0200
committerCorentin LABBE <clabbe@baylibre.com>2019-05-17 15:27:14 +0200
commitf1a9bf4c897557f4be42e26082d0f4d778534597 (patch)
tree085d6914ce8b2c6c72dbc7ef51ccdd30f1fb0ced
parentc85a22d1d41f7748eeedc7fa23f491c2fa58bad5 (diff)
lavalab-gen.py: fix NFS
The NFS code produce a working docker-compose.yml but this file is dumped before this modification. This patch moves the docker-compose.yml dump after last modifications of the dockcomp variable.
-rwxr-xr-xlavalab-gen.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 13639d2..ef4fd38 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -433,8 +433,6 @@ def main():
dockcomp_add_device(dockcomp, worker_name, "/dev/net/tun:/dev/net/tun")
dockcomp["services"][worker_name]["cap_add"] = []
dockcomp["services"][worker_name]["cap_add"].append("NET_ADMIN")
- with open(dockcomposeymlpath, 'w') as f:
- yaml.dump(dockcomp, f)
if "extra_actions" in worker:
fp = open("%s/scripts/extra_actions" % workerdir, "w")
for eaction in worker["extra_actions"]:
@@ -467,6 +465,8 @@ def main():
fp.write("apt-get -y install nfs-kernel-server\n")
fp.close()
os.chmod("%s/scripts/extra_actions" % workerdir, 0o755)
+ with open(dockcomposeymlpath, 'w') as f:
+ yaml.dump(dockcomp, f)
if "loglevel" in worker:
for component in worker["loglevel"]:
if component != "lava-slave":