aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/scripts/docker-compose/files/entrypoint.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-09-16 17:18:17 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-09-16 17:55:59 +0200
commit8e3a4154830c60b98636ec7a4c61002cbb882828 (patch)
treec35039a4626ad2c9739f466013fe25b3b5f9903a /mcp/scripts/docker-compose/files/entrypoint.sh
parent8c7d4db407abe0fe2df266503af1d4a8c49eade4 (diff)
docker-compose: Align hosts with hostname
When using Docker CE 19.x, `hostname -d` fails to properly resolve the domainname due to changes in the way Docker sets it inside the container. Work around this issue by aligning the contents of `/etc/hostname` with `/etc/hosts`, so `hostname -d` can properly determine the domain name. This also requires calling `hostname -b` via cfg01 entrypoint.sh. Change-Id: I697b5d9882e3d6641712a00bca10012800ee1898 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/docker-compose/files/entrypoint.sh')
-rwxr-xr-xmcp/scripts/docker-compose/files/entrypoint.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/mcp/scripts/docker-compose/files/entrypoint.sh b/mcp/scripts/docker-compose/files/entrypoint.sh
index 4ad1c154f..baf1f65d2 100755
--- a/mcp/scripts/docker-compose/files/entrypoint.sh
+++ b/mcp/scripts/docker-compose/files/entrypoint.sh
@@ -89,6 +89,11 @@ find -L /srv/salt /srv/salt/env/prd/_* -maxdepth 1 -type l -delete
# Fix up any permissions after above file shuffling
chown root:root -R /srv/salt
+# Docker-ce 19.x+ workaround for broken domainname setup
+# shellcheck source=/dev/null
+source /root/fuel/mcp/scripts/xdf_data.sh
+hostname -b "cfg01.${CLUSTER_DOMAIN}"
+
service ssh start
service salt-minion start