diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2019-04-25 16:33:09 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2019-04-25 16:33:09 +0200 |
commit | 1a945b23055136e5e89cd24585884b568d86a625 (patch) | |
tree | dc3388403fe2a5ed7a82b75891a1153d627460c7 /lavalab-gen.py | |
parent | 2fb6759a52e2e7ba267d0c0b93c1b32d4bd98dcb (diff) |
Permit to do NFS jobs
This patch adds an helper for doing NFS jobs
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-x | lavalab-gen.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py index d1a78e2..af01b2a 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -281,7 +281,7 @@ def main(): else: slaves = workers["slaves"] for slave in slaves: - keywords_slaves = [ "name", "host", "dispatcher_ip", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "extra_actions", "zmq_auth_key", "zmq_auth_key_secret", "default_slave", "export_ser2net", "expose_ser2net", "remote_user_token", "zmq_auth_master_key", "expose_ports", "env", "bind_dev", "loglevel" ] + keywords_slaves = [ "name", "host", "dispatcher_ip", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "extra_actions", "zmq_auth_key", "zmq_auth_key_secret", "default_slave", "export_ser2net", "expose_ser2net", "remote_user_token", "zmq_auth_master_key", "expose_ports", "env", "bind_dev", "loglevel", "use_nfs" ] for keyword in slave: if not keyword in keywords_slaves: print("WARNING: unknown keyword %s" % keyword) @@ -413,6 +413,15 @@ def main(): fp.write("\n") fp.close() os.chmod("%s/scripts/extra_actions" % workerdir, 0o755) + use_nfs = False + if "use_nfs" in worker: + use_nfs = worker["use_nfs"] + if use_nfs: + dockcomp["services"][worker_name]["volumes"].append("/var/lib/lava/dispatcher/tmp:/var/lib/lava/dispatcher/tmp") + fp = open("%s/scripts/extra_actions" % workerdir, "a") + fp.write("apt-get -y install nfs-kernel-server\n") + fp.close() + os.chmod("%s/scripts/extra_actions" % workerdir, 0o755) if "loglevel" in worker: for component in worker["loglevel"]: if component != "lava-slave": |