Bugfix for random key generation 89/23889/1
authoryuyang <Gabriel.yuyang@huawei.com>
Wed, 2 Nov 2016 18:17:19 +0000 (02:17 +0800)
committeryuyang <Gabriel.yuyang@huawei.com>
Wed, 2 Nov 2016 18:19:50 +0000 (02:19 +0800)
JIRA: BOTTLENECK-103

Fixing the bug when key generation within rubbos controller

Change-Id: Ib444b3a8fab14217bda75bee307ea18652e8b4e4
Signed-off-by: yuyang <Gabriel.yuyang@huawei.com>
testsuites/rubbos/puppet_manifests/internal/run_rubbos_internal.sh
testsuites/rubbos/run_rubbos.py

index 884315b..b08d2fb 100755 (executable)
@@ -191,7 +191,7 @@ fetch_remote_resources() {
 direct_ssh() {
   echo "127.0.0.1 $(hostname)" >> /etc/hosts
   echo "write hosts file: 127.0.0.1 $(hostname)"
-  cp ${LOCAL_GIT_REPO}/bottlenecks/utils/infra_setup/bottlenecks_key/bottlenecks_key /home/ubuntu/.ssh/id_rsa
+  cp /home/ubuntu/bottlenecks_key /home/ubuntu/.ssh/id_rsa
   sudo chmod 0600 /home/ubuntu/.ssh/id_rsa
   echo 'StrictHostKeyChecking no' > /home/ubuntu/.ssh/config
   sudo chown -R ubuntu:ubuntu /home/ubuntu/.ssh
index 63b9ae0..18103f7 100755 (executable)
@@ -369,6 +369,11 @@ def rubbos_run():
     print "Exec shell: " + cmd
     subprocess.call(cmd, shell=True)
 
+    cmd = "scp " + ssh_args + Bottlenecks_repo_dir + \
+        "/utils/infra_setup/bottlenecks_key/bottlenecks_key ubuntu@" + control_public_ip + ":/home/ubuntu/"
+    print "Exec shell: " + cmd
+    subprocess.call(cmd, shell=True)
+
     # call remote run_rubbos_internal.sh
     cmd = "ssh " + ssh_args + " ubuntu@" + control_public_ip + \
         ' "sudo /home/ubuntu/run_rubbos_internal.sh /home/ubuntu/rubbos.conf /home/ubuntu/btnks-results" '