[Swift-commit] r7734 - SwiftApps/cloud

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Wed Mar 19 13:30:26 CDT 2014


Author: ketan
Date: 2014-03-19 13:30:25 -0500 (Wed, 19 Mar 2014)
New Revision: 7734

Modified:
   SwiftApps/cloud/addnodes
   SwiftApps/cloud/remnodes
Log:
take into account the keypairs when adding or removing instances

Modified: SwiftApps/cloud/addnodes
===================================================================
--- SwiftApps/cloud/addnodes	2014-03-19 17:55:13 UTC (rev 7733)
+++ SwiftApps/cloud/addnodes	2014-03-19 18:30:25 UTC (rev 7734)
@@ -65,7 +65,7 @@
 
     echo "Waiting for $1 instance(s) to start"
     sleep 60
-    for i in $(echo $runinst | grep 'INSTANCE' | grep -o '\bi-........\b'); do
+    for i in $(echo $runinst | grep -E "INSTANCE.*$EC2KEYPAIR" | grep -o '\bi-........\b'); do
         #ip=$(ec2din $i | grep 'running' | awk '{print $15}')
         ip=$(ec2din --show-empty-fields $i | grep running | awk '{print $17}')
         start_worker_ssh $ip 

Modified: SwiftApps/cloud/remnodes
===================================================================
--- SwiftApps/cloud/remnodes	2014-03-19 17:55:13 UTC (rev 7733)
+++ SwiftApps/cloud/remnodes	2014-03-19 18:30:25 UTC (rev 7734)
@@ -26,7 +26,7 @@
     #ec2-run-instance -k <key-name> -n 1 -g <groupname> --instance-type <type> <ami-id>
     for i in $(seq 1 $1); do
         #ip=$(ec2din | grep running | head -1 | awk '{print $15}')
-        ip=$(ec2din --show-empty-fields | grep -E 'INSTANCE.*running' | head -n 1 | awk '{print $17}')
+        ip=$(ec2din --show-empty-fields | grep -E "INSTANCE.*running.*$EC2KEYPAIR" | head -n 1 | awk '{print $17}')
         rem_instance "${ip}"
         sleep 5
     done




More information about the Swift-commit mailing list