aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEduardo Gonzalez <dabarren@gmail.com>2017-04-28 01:57:42 +0200
committerEduardo Gonzalez <dabarren@gmail.com>2017-05-01 13:00:59 +0000
commit508f73e059fdfe8e051c58762dc8e21d826d54db (patch)
treea67ff939515f09141bc6e6216f07e2926fa96100 /tools
parent4433a95698da147f3eae8f12b526c2fc204b7a42 (diff)
downloadkolla-508f73e059fdfe8e051c58762dc8e21d826d54db.tar.gz
kolla-508f73e059fdfe8e051c58762dc8e21d826d54db.zip
Add ssh-keyscan to unblock kolla gate
As a change to remove puppet from infra nodepool, ssh-keyscan is needed for each node [0] Permissions to ssh/config file should be 600 instead of current 664 [1] Refs: [0] http://lists.openstack.org/pipermail/openstack-dev/2017-April/116036.html [1] http://logs.openstack.org/68/461368/1/check/gate-kolla-ansible-dsvm-deploy-centos-binary-centos-7-nv/0a94da7/console.html#_2017-05-01_12_06_08_440775 Closes-Bug: #1687408 Change-Id: I338e457fff35d8a28bd9f96e88dbb4ee55a47864
Diffstat (limited to 'tools')
-rwxr-xr-xtools/setup_gate.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh
index 6939f257a..ce3f786e2 100755
--- a/tools/setup_gate.sh
+++ b/tools/setup_gate.sh
@@ -122,6 +122,7 @@ function setup_ssh {
# From now on use the new IdentityFile for connecting to other hosts
echo "IdentityFile /home/jenkins/.ssh/kolla" >> /home/jenkins/.ssh/config
+ chmod 600 /home/jenkins/.ssh/config
}
function setup_inventory {
@@ -134,6 +135,7 @@ function setup_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
+ ssh-keyscan "${ip}" >> ~/.ssh/known_hosts
echo -e "${ip}\tnode${counter}" >> /tmp/hosts
echo -e "${ip}\t$(ssh ${ip} hostname)" >> /tmp/hosts
echo "node${counter}" >> ${RAW_INVENTORY}
@@ -154,15 +156,16 @@ function setup_ansible {
setup_inventory
- # Record the running state of the environment as seen by the setup module
- ansible all -i ${RAW_INVENTORY} -m setup > /tmp/logs/ansible/initial-setup
-
sudo -H pip install ara
sudo mkdir /etc/ansible
sudo tee /etc/ansible/ansible.cfg<<EOF
[defaults]
callback_plugins = /usr/lib/python2.7/site-packages/ara/plugins/callbacks:\$VIRTUAL_ENV/lib/python2.7/site-packages/ara/plugins/callbacks
+host_key_checking = False
EOF
+
+ # Record the running state of the environment as seen by the setup module
+ ansible all -i ${RAW_INVENTORY} -m setup > /tmp/logs/ansible/initial-setup
}
function setup_node {