[Swift-commit] r2543 - provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sun Feb 15 17:32:51 CST 2009


Author: benc
Date: 2009-02-15 17:32:50 -0600 (Sun, 15 Feb 2009)
New Revision: 2543

Modified:
   provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java
Log:
option to make provider-wonky start jobs in a job directory other than that
specified by the job. this is a failure mode that I've seen on some
OSG sites, where they site the job in a condor-created job directory.

Modified: provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java
===================================================================
--- provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java	2009-02-15 22:47:59 UTC (rev 2542)
+++ provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java	2009-02-15 23:32:50 UTC (rev 2543)
@@ -164,6 +164,20 @@
             if (spec.getDirectory() != null) {
                 dir = new File(spec.getDirectory());
             }
+
+            if(siteOptions.contains("wrongdirectory")) {
+                File newdir = new File("/tmp");
+                // this is to so that we don't use /tmp as the wrong
+                // directory if that happens to be what the user asked for
+                if(dir.equals(newdir)) {
+                    dir = new File("/");
+                } else {
+                    dir = newdir;
+                }
+                logger.info("Deliberately using wrong working directory: "+dir);
+            }
+
+
             logger.info("Wonky job in queue, job number "+jobNumber);
             String[] cmdarray = buildCmdArray(spec, jobNumber);
             try {




More information about the Swift-commit mailing list