[Swift-commit] r7729 - SwiftApps/cloud

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Wed Mar 19 11:29:19 CDT 2014


Author: ketan
Date: 2014-03-19 11:29:19 -0500 (Wed, 19 Mar 2014)
New Revision: 7729

Modified:
   SwiftApps/cloud/remnodes
Log:
ec2 cmd fix in remove nodes

Modified: SwiftApps/cloud/remnodes
===================================================================
--- SwiftApps/cloud/remnodes	2014-03-19 16:11:06 UTC (rev 7728)
+++ SwiftApps/cloud/remnodes	2014-03-19 16:29:19 UTC (rev 7729)
@@ -9,7 +9,7 @@
 rem_instance() {
       MACHINE=$1
       #ec2din | grep 54.243.24.154 | awk '{print $2}'
-      instanceid=$(ec2din | grep $1 | awk '{print $2}')
+      instanceid=$(ec2din --show-empty-fields | grep $1 | awk '{print $2}')
       ec2kill $instanceid
       # Connect directly
    return 0
@@ -25,7 +25,8 @@
 rembynum (){
     #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 | grep running | head -1 | awk '{print $15}')
+        ip=$(ec2din --show-empty-fields | grep running | awk '{print $17}')
         rem_instance "${ip}"
         sleep 15
     done




More information about the Swift-commit mailing list