From ed1055f97b5867e2c6683299afb6e7671982fa15 Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Tue, 30 Oct 2018 08:58:34 +0100 Subject: README: Add documentation for the slave attribute of boards This patch adds missing documentation on how to choose the slave owing a device. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2b9afdf..4c1ea18 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,7 @@ slaves: boards: - name: devicename Each board must be named by their device-type as "device-type-XX" (where XX is a number) type: the LAVA device-type of this device + slave: (optional) Name of the slave managing this device. Default to first slave found or default_slave if set. kvm: (For qemu only) Does the qemu could use KVM (default: no) uboot_ipaddr: (optional) a static IP to set in uboot uboot_macaddr: (Optional) the MAC address to set in uboot -- cgit 1.2.3-korg From fb1104d60ec85e3698395e7874a2d670ab39a41d Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Tue, 30 Oct 2018 09:06:02 +0100 Subject: lava-slave/Dockerfile: Remade extra_actions working extra_actions is broken since commit f3d53d64922d ("lava-slave/Dockerfile: copy all scripts in one actions") It is not anymore copied in /root but in /usr/local/bin/ --- lava-slave/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile index 7b811bf..e93764d 100644 --- a/lava-slave/Dockerfile +++ b/lava-slave/Dockerfile @@ -41,7 +41,7 @@ COPY devices/ /root/devices/ COPY tags/ /root/tags/ COPY deviceinfo/ /root/deviceinfo/ -RUN if [ -x /root/extra_actions ] ; then /root/extra_actions ; fi +RUN if [ -x /usr/local/bin/extra_actions ] ; then /usr/local/bin/extra_actions ; fi RUN apt-get -y install screen openssh-server RUN ssh-keygen -q -f /root/.ssh/id_rsa -- cgit 1.2.3-korg From 66e65375f30137e5320766403a1b23069b4cd5cd Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Tue, 30 Oct 2018 09:35:47 +0100 Subject: lavalab-gen.py: Add slave_keys for copying public slave keys When creating a split boards.yaml with only one master which uses ZMQ, no way to adds slave key exists. This patch fix that by adding a way to copy all slave keys. --- README.md | 1 + lavalab-gen.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c1ea18..01b3f83 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,7 @@ masters: zmq_auth: True/False Does the master requires ZMQ authentication. zmq_auth_key: optional path to a public ZMQ key zmq_auth_key_secret: optional path to a private ZMQ key + slave_keys: optional path to a directory with slaves public key. Usefull when you want to create a master without slaves nodes in boards.yaml. persistent_db: True/False (default False) Is the postgres DB is persistent over reboot http_fqdn: The FQDN used to access the LAVA web interface. This is necessary if you use https otherwise you will issue CSRF errors. users: diff --git a/lavalab-gen.py b/lavalab-gen.py index 3dd8eb4..7061a72 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -93,7 +93,7 @@ def main(): else: masters = workers["masters"] for master in masters: - keywords_master = [ "name", "type", "host", "users", "groups", "tokens", "webadmin_https", "persistent_db", "zmq_auth", "zmq_auth_key", "zmq_auth_key_secret", "http_fqdn" ] + keywords_master = [ "name", "type", "host", "users", "groups", "tokens", "webadmin_https", "persistent_db", "zmq_auth", "zmq_auth_key", "zmq_auth_key_secret", "http_fqdn", "slave_keys" ] for keyword in master: if not keyword in keywords_master: print("WARNING: unknown keyword %s" % keyword) @@ -166,6 +166,11 @@ def main(): else: zmq_auth_genlist.write("%s/%s\n" % (host, name)) need_zmq_auth_gen = True + if "slave_keys" in worker: + src_files = os.listdir(worker["slave_keys"]) + for file_name in src_files: + full_file_name = os.path.join(worker["slave_keys"], file_name) + shutil.copy(full_file_name, "%s/zmq_auth/" % workerdir) if "users" in worker: for user in worker["users"]: keywords_users = [ "name", "staff", "superuser", "password", "token", "email", "groups" ] -- cgit 1.2.3-korg