summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
authorFabian Scheler <Fabian.Scheler@siemens.com>2020-07-14 13:24:12 +0200
committerFabian Scheler <Fabian.Scheler@siemens.com>2020-07-14 13:24:12 +0200
commit2d7a167ffe0cd2a2db5164a63c16c13464376cff (patch)
treed0981a397556c1c6a90a15dbc71039900ab9cbb4 /lavalab-gen.py
parentc6592d385d17b89e6dd9dc244fb592d5ab38f28a (diff)
[Fix] Ensure proper filename of public master key
Currently, the public master key is references as $LAVA_MASTER.key in e.g. scripts/setup.sh. If the key is named master.key it is copied to $LAVA_MASTER.key by scripts/setup.sh. However, no nameing convention for the public master key provided to lavalab-gen.py is documented, so the worker simply will not start if the key is stored as e.g. master-public.key. Running into such error scenarios could simply be prevented by copying the public master key to an appropriatly named file in lavalab-gen.py. This is done here.
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index f7cd66d..87b0cd5 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -501,7 +501,7 @@ def main():
if "zmq_auth_key" in worker:
shutil.copy(worker["zmq_auth_key"], "%s/zmq_auth/" % workerdir)
shutil.copy(worker["zmq_auth_key_secret"], "%s/zmq_auth/" % workerdir)
- shutil.copy(worker["zmq_auth_master_key"], "%s/zmq_auth/" % workerdir)
+ shutil.copy(worker["zmq_auth_master_key"], "%s/zmq_auth/%s.key" % (workerdir,remote_master))
for fm in masters:
if fm["name"].lower() == remote_master.lower():
slave_master = fm