diff options
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": |