From ad5d3b6a3781a303ed8ff68076351c937a0f06db Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 29 May 2018 14:34:16 +0200 Subject: 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. --- rumba/testbeds/dockertb.py | 6 +++--- 1 file 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") -- cgit v1.2.3