aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-05-29 14:34:16 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2018-05-29 14:34:16 +0200
commitad5d3b6a3781a303ed8ff68076351c937a0f06db (patch)
treec507d4156883a630cc2945e308e204e180ed49a1
parentbe24b0f8b90d73de3e8032361d3031af6161199c (diff)
downloadrumba-ad5d3b6a3781a303ed8ff68076351c937a0f06db.tar.gz
rumba-ad5d3b6a3781a303ed8ff68076351c937a0f06db.zip
testbeds: Fix invalid container names
Docker was failing when the node name was only a single character, which is not allowed. This always adds the prefix 'node-' to node names to solve this problem.
-rw-r--r--rumba/testbeds/dockertb.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rumba/testbeds/dockertb.py b/rumba/testbeds/dockertb.py
index 4079ffe..2ee4561 100644
--- a/rumba/testbeds/dockertb.py
+++ b/rumba/testbeds/dockertb.py
@@ -80,9 +80,9 @@ class Testbed(mod.Testbed):
# Start all nodes
for node in experiment.nodes:
self.running_containers[node.name] = docker_client.containers.run(
- self.base_image, command=node.startup_command, name=node.name,
- detach=True, network="none", privileged=True,
- devices=["/dev/fuse"])
+ self.base_image, command=node.startup_command,
+ name='node-' + node.name, detach=True, network="none",
+ privileged=True, devices=["/dev/fuse"])
logger.info("Nodes starting")