Skip to content
Snippets Groups Projects
Commit 072cec2f authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Fix the rabbitmq crash on CentOS binary and source deploy"

parents 931158b5 c98e9c44
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ function setup_disk { ...@@ -31,7 +31,7 @@ function setup_disk {
# (SamYaple)TODO: Remove the path overriding # (SamYaple)TODO: Remove the path overriding
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
cat | sudo tee /etc/yum.repos.d/docker.repo << EOF sudo tee /etc/yum.repos.d/docker.repo << EOF
[docker] [docker]
name=Docker Main Repository name=Docker Main Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7 baseurl=https://yum.dockerproject.org/repo/main/centos/7
......
...@@ -76,17 +76,16 @@ function setup_ssh { ...@@ -76,17 +76,16 @@ function setup_ssh {
function setup_inventory { function setup_inventory {
local counter=0 local counter=0
if [[ "${DISTRO}" == "Debian" ]]; then
ANSIBLE_CONNECTION_TYPE=ssh
else
ANSIBLE_CONNECTION_TYPE=local
fi
echo -e "127.0.0.1\tlocalhost" > /tmp/hosts echo -e "127.0.0.1\tlocalhost" > /tmp/hosts
for ip in $(cat /etc/nodepool/{node_private,sub_nodes_private}); do for ip in $(cat /etc/nodepool/{node_private,sub_nodes_private}); do
: $((counter++)) : $((counter++))
echo -e "${ip}\tnode${counter} $(ssh ${ip} hostname)" >> /tmp/hosts # FIXME(jeffrey4l): do not set two hostnames in oneline. this is a
echo "node${counter} ansible_connection=${ANSIBLE_CONNECTION_TYPE}" >> ${RAW_INVENTORY} # wordround fix for the rabbitmq failed when deploy on CentOS in the CI
# gate. the ideal fix should set the hostname in setup_gate.sh script.
# But it do not work as expect with unknown reason
echo -e "${ip}\tnode${counter}" >> /tmp/hosts
echo -e "${ip}\t$(ssh ${ip} hostname)" >> /tmp/hosts
echo "node${counter}" >> ${RAW_INVENTORY}
done done
sudo chown root: /tmp/hosts sudo chown root: /tmp/hosts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment