summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhihui wu <zhihui.wu2006+zte@gmail.com>2017-03-23 06:55:55 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-23 06:55:55 +0000
commit28d770484f74b3717780531cf610d1ea1389d7e1 (patch)
tree923a84f90e9743637039c5e8fb7b2d44b5e00bec
parent974c15413a468eba0583538684fb526a49121267 (diff)
parent899840fd5e7b0a6cde1d5f19a7725c5362e0cb26 (diff)
Merge "Fix socker connection issue in qtip docker"
-rw-r--r--opt/infra/roles/qtip/files/run_qtip_server.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/opt/infra/roles/qtip/files/run_qtip_server.sh b/opt/infra/roles/qtip/files/run_qtip_server.sh
index 0f5cafea..75145e2b 100644
--- a/opt/infra/roles/qtip/files/run_qtip_server.sh
+++ b/opt/infra/roles/qtip/files/run_qtip_server.sh
@@ -1,4 +1,24 @@
#!/bin/bash
envs="INSTALLER_TYPE=fuel -e INSTALLER_IP=10.20.0.2 -e NODE_NAME=zte-pod1"
-docker run --name qtip -id -e $envs -p 5000:5000 opnfv/qtip
+
+# use ramfs to fix docker socket connection issue with overlay mode in centos
+ramfs=/tmp/qtip/ramfs
+if [ ! -d $ramfs ]; then
+ mkdir -p $ramfs
+fi
+
+if [ ! -z $(df $ramfs | tail -n -1 | grep $ramfs) ]; then
+ sudo mount -t tmpfs -o size=32M tmpfs $ramfs
+fi
+
+# enable contro path in docker
+echo <<EOF > /tmp/ansible.cfg
+[defaults]
+callback_whitelist = profile_tasks
+[ssh_connection]
+control_path=/mnt/ramfs/ansible-ssh-%%h-%%p-%%r
+EOF
+
+docker run --name qtip -id -e $envs -p 5000:5000 -v $ramfs:/mnt/ramfs opnfv/qtip
+docker cp qtip /tmp/ansible.cfg /home/opnfv/.ansible.cfg