diff --git a/backend/kolla/trustme.sh b/backend/kolla/trustme.sh index 7b7eac20..d2f682a0 100644 --- a/backend/kolla/trustme.sh +++ b/backend/kolla/trustme.sh @@ -53,7 +53,7 @@ if [ $? != 0 ]; then print_log "delete pub key of $ip from known_hosts failed" exit 1 fi -sshpass -p $passwd ssh -o StrictHostKeyChecking=no $ip "touch ~/.ssh/authorized_keys" +sshpass -p $passwd ssh -o StrictHostKeyChecking=no $ip "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys" if [ $? != 0 ]; then print_log "ssh $ip to create file authorized_keys failed" exit 1 diff --git a/code/daisy/daisy/api/backends/kolla/install.py b/code/daisy/daisy/api/backends/kolla/install.py index 00c8f341..d9886812 100644 --- a/code/daisy/daisy/api/backends/kolla/install.py +++ b/code/daisy/daisy/api/backends/kolla/install.py @@ -340,6 +340,8 @@ class KOLLAInstallTask(Thread): with open(self.log_file, "w+") as fp: for host in hosts_list: host_ip = host['mgtip'] + cmd = '/var/lib/daisy/kolla/trustme.sh %s ossdbg1' % host_ip + daisy_cmn.subprocess_call(cmd, fp) config_nodes_hosts(host_name_ip_list, host_ip) cmd = 'sshpass -p ossdbg1 ssh -o StrictHostKeyChecking=no %s \ "if [ ! -d %s ];then mkdir %s;fi" ' % \