[Saga-devel] saga SVN commit 3379: /trunk/adaptors/aws/aws_job/

amerzky at cct.lsu.edu amerzky at cct.lsu.edu
Sat Jan 24 13:22:53 CST 2009


User: amerzky
Date: 2009/01/24 01:22 PM

Modified:
 /trunk/adaptors/aws/aws_job/
  aws_job_service.cpp

Log:
 cleanup FIXMEs
 A

File Changes:

Directory: /trunk/adaptors/aws/aws_job/
=======================================

File [modified]: aws_job_service.cpp
Delta lines: +10 -29
===================================================================
--- trunk/adaptors/aws/aws_job/aws_job_service.cpp	2009-01-24 16:57:14 UTC (rev 3378)
+++ trunk/adaptors/aws/aws_job/aws_job_service.cpp	2009-01-24 19:22:51 UTC (rev 3379)
@@ -400,15 +400,9 @@
         SAGA_ADAPTOR_THROW ("image prep-staging failed", saga::NoSuccess);
       }
 
-      // FIXME: we do not know why early application runs with SAGA fail on
-      // EC instances, but they do.  So sleep for 5 minutes, to let the system
-      // settle down.  BTW: we also don't know why boost::process::child.wait
-      // hangs if we try the below w/o sleeping first.  Its all a mess.
-      ::sleep (300);
-
-
-
       // run the prep script
+      // when the prep script returns successfully, we take that as a signal that 
+      // SAGA applications can run on the remote host.
       proc.set_cmd ("/usr/bin/ssh");
 
       proc.clear_args ();
@@ -419,29 +413,16 @@
       proc.add_arg  (user_ + "@" + vm_ip_);
       proc.add_arg  ("/tmp/saga-ec2-image-prep");
 
-      int count = 0;
-      while ( count < 100 )
-      {
-        (void) proc.run_sync (false);
+      (void) proc.run_sync (false);
 
-        if ( proc.done () )
-        {
-          SAGA_LOG_ALWAYS ("image prep succeeded");
-          break;
-        }
-        else
-        {
-          SAGA_LOG_ALWAYS ("trying image prep");
-          ::sleep (1);
-        }
-
-        count ++;
-
-        if ( count++ > 100 )
-        {
-          SAGA_ADAPTOR_THROW ("image preparation failed repeatedly", saga::NoSuccess);
-        }
+      if ( proc.done () )
+      {
+        SAGA_LOG_ALWAYS ("image prep succeeded");
       }
+      else
+      {
+        SAGA_ADAPTOR_THROW ("image preparation failed repeatedly", saga::NoSuccess);
+      }
     }
   }
 



More information about the saga-devel mailing list