[workspace-commit] CVS update: MODIFIED: util

Tim Freeman commit at globus.org
Thu May 21 15:02:06 CDT 2009


, ExecuteUtil.java
 ...

  User: tfreeman
  Date: 09/05/21 15:02:06

  Modified:    vm/service/client/java/source/src/org/globus/workspace/cloud/client/util
                        ExecuteUtil.java
  Log:
  hostkeydir option in cloud client (used with the context broker) will place a file for each host in a history subdirectory.  filename is hostname, file contents is known_hosts format (including public key)
  
  Revision  Changes    Path
  1.5       +24 -3     workspace/vm/service/client/java/source/src/org/globus/workspace/cloud/client/util/ExecuteUtil.java
  
  http://viewcvs.globus.org/viewcvs.cgi/workspace/vm/service/client/java/source/src/org/globus/workspace/cloud/client/util/ExecuteUtil.java.diff?r1=1.4&r2=1.5
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ExecuteUtil.java
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/workspace/vm/service/client/java/source/src/org/globus/workspace/cloud/client/util/ExecuteUtil.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- ExecuteUtil.java	25 Feb 2009 18:01:24 -0000	1.4
  +++ ExecuteUtil.java	21 May 2009 20:02:06 -0000	1.5
  @@ -469,6 +469,24 @@
                       "Could not create directory '" + eprIdIpDirPath + "'");
           }
   
  +        String knownHostsDirPath = null;
  +        if (knownHostTasks != null) {
  +            for (KnownHostsTask knownHostTask : knownHostTasks) {
  +                if (knownHostTask.perHostDir) {
  +                    final File newdir6 = new File(newdirPath, "knownhosts-dir");
  +                    knownHostsDirPath = newdir6.getAbsolutePath();
  +                    if (newdir6.mkdir()) {
  +                        print.debugln("Created directory: " + knownHostsDirPath);
  +                    } else {
  +                        throw new ExecutionProblem(
  +                                "Could not create directory '" +
  +                                        knownHostsDirPath + "'");
  +                    }
  +                    break;
  +                }
  +            }
  +        }
  +
           // see comments inside loop about ensemble and context EPRs
           final File ensFile = new File(newdir,
                                         HistoryUtil.ENSEMBLE_EPR_FILE_NAME);
  @@ -699,7 +717,7 @@
               // correctly.
               final KnownHostsTask[] sendTasks =
                       hostTaskIDs(knownHostTasks, allEPRpaths,
  -                                print, eprIdIpDirPath);
  +                                print, eprIdIpDirPath, knownHostsDirPath);
   
               final long ctx_start = System.currentTimeMillis();
               
  @@ -1057,7 +1075,8 @@
       private static KnownHostsTask[] hostTaskIDs(KnownHostsTask[] tasks,
                                                   String[] allEPRPaths,
                                                   Print pr,
  -                                                String eprIdIpDirPath) {
  +                                                String eprIdIpDirPath,
  +                                                String knownHostsDirPath) {
   
           if (tasks == null || tasks.length == 0) {
               return null;
  @@ -1094,7 +1113,9 @@
                                   new KnownHostsTask(allids[j],
                                                      pair.ip,
                                                      task.interfaceName,
  -                                                   printName));
  +                                                   printName,
  +                                                   knownHostsDirPath != null,
  +                                                   knownHostsDirPath));
                           break;
                       }
                   }
  
  
  



More information about the workspace-commit mailing list