From: asteroide Date: Wed, 10 May 2017 08:38:55 +0000 (+0200) Subject: Limit the length of the hostname to 63 characters due to the hostname length limitation X-Git-Tag: opnfv-5.1.RC1~88 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=80ca346a4cb183a6a1e684f6d8a9e19e3fc55d0e;p=moon.git Limit the length of the hostname to 63 characters due to the hostname length limitation Change-Id: I8552b9f29e8bae04d8f6fcaf2085402b2250e7e8 --- diff --git a/moonv4/moon_orchestrator/moon_orchestrator/dockers.py b/moonv4/moon_orchestrator/moon_orchestrator/dockers.py index 2eecdc0e..0b53de96 100644 --- a/moonv4/moon_orchestrator/moon_orchestrator/dockers.py +++ b/moonv4/moon_orchestrator/moon_orchestrator/dockers.py @@ -148,7 +148,7 @@ RUN pip3 install --upgrade . output = self.docker.create_container(image=self.tag, command=list(self.run_cmd), - hostname=str(self.id.replace("_", "-")), + hostname=str(self.id.replace("_", "-"))[:63], name=str(self.id), networking_config=self.__get_docker_network(), host_config=host_config