diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2019-09-18 11:34:36 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2019-09-19 11:50:22 +0200 |
commit | adf687abc9f9d9d3d114dcaa1208e52b4d88f446 (patch) | |
tree | ab349a1231dd4a28b89180a95fab39eb7e0a7dfa /lavalab-gen.py | |
parent | d731046b2d8e0168a67b3f59c4706007488a4390 (diff) |
Permit to not export NBD port
When doing a qemu-only slave, there are no need of NBD.
This patch adds a use_nbd option.
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-x | lavalab-gen.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py index cb76e50..58d57a5 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -304,7 +304,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", "use_nfs", "arch", "devices", "lava-coordinator", "use_tap", "host_healthcheck", "use_tftp" ] + 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", "arch", "devices", "lava-coordinator", "use_tap", "host_healthcheck", "use_tftp", "use_nbd" ] for keyword in slave: if not keyword in keywords_slaves: print("WARNING: unknown keyword %s" % keyword) @@ -334,7 +334,7 @@ def main(): dockcomp["services"][name] = {} dockcomp["services"][name]["hostname"] = name dockcomp["services"][name]["dns_search"] = "" - dockcomp["services"][name]["ports"] = [ "80:80", "61950-62000:61950-62000" ] + dockcomp["services"][name]["ports"] = [ "80:80" ] dockcomp["services"][name]["volumes"] = [ "/boot:/boot", "/lib/modules:/lib/modules" ] dockcomp["services"][name]["environment"] = {} dockcomp["services"][name]["build"] = {} @@ -479,6 +479,12 @@ def main(): use_tftp = worker["use_tftp"] if use_tftp: dockcomp["services"][name]["ports"].append("69:69/udp") + # TODO permit to change the range of NBD ports + use_nbd = True + if "use_nbd" in worker: + use_nbd = worker["use_nbd"] + if use_nbd: + dockcomp["services"][name]["ports"].append("61950-62000:61950-62000") use_nfs = False if "use_nfs" in worker: use_nfs = worker["use_nfs"] |