[Swift-commit] cog r3865

swift at ci.uchicago.edu swift at ci.uchicago.edu
Thu Jan 23 00:20:05 CST 2014


------------------------------------------------------------------------
r3865 | hategan | 2014-01-23 00:17:02 -0600 (Thu, 23 Jan 2014) | 1 line

(potentially) fixed generation of autoCA proxies for long-running JVM instances
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java	(revision 3864)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java	(working copy)
@@ -83,6 +83,8 @@
     public static final boolean LOCALJVM = false;
     
     public static final boolean LOCALJVM_WHEN_LOCAL = true;
+    
+    private static boolean useAutoCA;
 
     private BootstrapService bootstrapService;
     private LocalService localService;
@@ -227,8 +229,8 @@
         }
     }
 
-    private void setupGSIProxy() throws IOException, GeneralSecurityException {
-        if (!checkStandardProxy()) {
+    private static synchronized void setupGSIProxy() throws IOException, GeneralSecurityException {
+        if (!checkStandardProxy() || useAutoCA) {
             /*
              *  only do the automatic CA if a standard proxy file does not exist
              *  to allow using things like GridFTP from the coaster service through
@@ -238,13 +240,19 @@
             AutoCA.Info result = AutoCA.getInstance().createProxy();
             System.setProperty("X509_USER_PROXY", result.proxyPath);
             System.setProperty("X509_CERT_DIR", result.caCertPath);
+            /*
+             * Need to set this since subsequent checks for the standard
+             * proxy will find a proxy from the AutoCA effectively preventing
+             * new AutoCA proxies from being generated if needed 
+             */
+            useAutoCA = true;
         }
         else {
             logger.info("Standard proxy file found. Disabling AutoCA.");
         }
     }
 
-    private boolean checkStandardProxy() {
+    private static boolean checkStandardProxy() {
         File proxy = new File(CoGProperties.getDefault().getProxyFile());
         return proxy.exists();
     }



More information about the Swift-commit mailing list