summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2019-09-18 11:26:43 +0200
committerCorentin LABBE <clabbe@baylibre.com>2019-09-19 11:49:47 +0200
commitd731046b2d8e0168a67b3f59c4706007488a4390 (patch)
treee9debc69adef311c4b896334877ef9ae56f171a2
parentb62cce369977403b2b2fa5e6d7c0af9d71058364 (diff)
Permit to not export TFTP port
When doing a qemu-only slave, there are no need of TFTP. This patch adds a use_tftp option.
-rw-r--r--README.md1
-rwxr-xr-xlavalab-gen.py9
2 files changed, 8 insertions, 2 deletions
diff --git a/README.md b/README.md
index 04e9b73..46c8373 100644
--- a/README.md
+++ b/README.md
@@ -267,6 +267,7 @@ slaves:
remote_proto: http(default) or https
default_slave: Does this slave is the default slave where to add boards (default: lab-slave-0)
bind_dev: Bind /dev from host to slave. This is needed when using some HID PDU
+ use_tftp: Does LAVA need a TFTP server (default True)
use_nfs: Does the LAVA dispatcher will run NFS jobs
use_tap: Does TAP netdevices could be used
arch: The arch of the worker (if not x86_64), only accept arm64
diff --git a/lavalab-gen.py b/lavalab-gen.py
index c2c5347..cb76e50 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" ]
+ 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" ]
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"] = [ "69:69/udp", "80:80", "61950-62000:61950-62000" ]
+ dockcomp["services"][name]["ports"] = [ "80:80", "61950-62000:61950-62000" ]
dockcomp["services"][name]["volumes"] = [ "/boot:/boot", "/lib/modules:/lib/modules" ]
dockcomp["services"][name]["environment"] = {}
dockcomp["services"][name]["build"] = {}
@@ -474,6 +474,11 @@ def main():
fudev.close()
if not "bind_dev" in slave or not slave["bind_dev"]:
dockcomp_add_device(dockcomp, worker_name, "/dev/%s:/dev/%s" % (udev_dev["name"], udev_dev["name"]))
+ use_tftp = True
+ if "use_tftp" in worker:
+ use_tftp = worker["use_tftp"]
+ if use_tftp:
+ dockcomp["services"][name]["ports"].append("69:69/udp")
use_nfs = False
if "use_nfs" in worker:
use_nfs = worker["use_nfs"]