[Swift-commit] cog r4041
swift at ci.uchicago.edu
swift at ci.uchicago.edu
Tue Aug 5 15:50:03 CDT 2014
------------------------------------------------------------------------
r4041 | yadunand | 2014-08-05 15:48:00 -0500 (Tue, 05 Aug 2014) | 3 lines
Committing latest provider changes
------------------------------------------------------------------------
Index: modules/provider-localscheduler/libexec/ec2-cloud-provider/stsubmit.sh
===================================================================
--- modules/provider-localscheduler/libexec/ec2-cloud-provider/stsubmit.sh (revision 0)
+++ modules/provider-localscheduler/libexec/ec2-cloud-provider/stsubmit.sh (revision 4041)
@@ -0,0 +1 @@
+link ../../examples/ec2-cloud-provider/stsubmit.sh
\ No newline at end of file
Property changes on: modules/provider-localscheduler/libexec/ec2-cloud-provider/stsubmit.sh
___________________________________________________________________
Added: svn:special
+ *
Index: modules/provider-localscheduler/libexec/ec2-cloud-provider/stcancel.sh
===================================================================
--- modules/provider-localscheduler/libexec/ec2-cloud-provider/stcancel.sh (revision 0)
+++ modules/provider-localscheduler/libexec/ec2-cloud-provider/stcancel.sh (revision 4041)
@@ -0,0 +1 @@
+link ../../examples/ec2-cloud-provider/stcancel.sh
\ No newline at end of file
Property changes on: modules/provider-localscheduler/libexec/ec2-cloud-provider/stcancel.sh
___________________________________________________________________
Added: svn:special
+ *
Index: modules/provider-localscheduler/libexec/ec2-cloud-provider/ststat.sh
===================================================================
--- modules/provider-localscheduler/libexec/ec2-cloud-provider/ststat.sh (revision 0)
+++ modules/provider-localscheduler/libexec/ec2-cloud-provider/ststat.sh (revision 4041)
@@ -0,0 +1 @@
+link ../../examples/ec2-cloud-provider/ststat.sh
\ No newline at end of file
Property changes on: modules/provider-localscheduler/libexec/ec2-cloud-provider/ststat.sh
___________________________________________________________________
Added: svn:special
+ *
Index: modules/provider-localscheduler/libexec/ec2-cloud-provider/cloud.py
===================================================================
--- modules/provider-localscheduler/libexec/ec2-cloud-provider/cloud.py (revision 0)
+++ modules/provider-localscheduler/libexec/ec2-cloud-provider/cloud.py (revision 4041)
@@ -0,0 +1 @@
+link ../../examples/ec2-cloud-provider/cloud.py
\ No newline at end of file
Property changes on: modules/provider-localscheduler/libexec/ec2-cloud-provider/cloud.py
___________________________________________________________________
Added: svn:special
+ *
Index: modules/provider-localscheduler/libexec/gce-cloud-provider/stsubmit.sh
===================================================================
--- modules/provider-localscheduler/libexec/gce-cloud-provider/stsubmit.sh (revision 0)
+++ modules/provider-localscheduler/libexec/gce-cloud-provider/stsubmit.sh (revision 4041)
@@ -0,0 +1 @@
+link ../../examples/gce-cloud-provider/stsubmit.sh
\ No newline at end of file
Property changes on: modules/provider-localscheduler/libexec/gce-cloud-provider/stsubmit.sh
___________________________________________________________________
Added: svn:special
+ *
Index: modules/provider-localscheduler/libexec/gce-cloud-provider/stcancel.sh
===================================================================
--- modules/provider-localscheduler/libexec/gce-cloud-provider/stcancel.sh (revision 0)
+++ modules/provider-localscheduler/libexec/gce-cloud-provider/stcancel.sh (revision 4041)
@@ -0,0 +1 @@
+link ../../examples/gce-cloud-provider/stcancel.sh
\ No newline at end of file
Property changes on: modules/provider-localscheduler/libexec/gce-cloud-provider/stcancel.sh
___________________________________________________________________
Added: svn:special
+ *
Index: modules/provider-localscheduler/libexec/gce-cloud-provider/ststat.sh
===================================================================
--- modules/provider-localscheduler/libexec/gce-cloud-provider/ststat.sh (revision 0)
+++ modules/provider-localscheduler/libexec/gce-cloud-provider/ststat.sh (revision 4041)
@@ -0,0 +1 @@
+link ../../examples/gce-cloud-provider/ststat.sh
\ No newline at end of file
Property changes on: modules/provider-localscheduler/libexec/gce-cloud-provider/ststat.sh
___________________________________________________________________
Added: svn:special
+ *
Index: modules/provider-localscheduler/libexec/gce-cloud-provider/cloud.py
===================================================================
--- modules/provider-localscheduler/libexec/gce-cloud-provider/cloud.py (revision 0)
+++ modules/provider-localscheduler/libexec/gce-cloud-provider/cloud.py (revision 4041)
@@ -0,0 +1 @@
+link ../../examples/gce-cloud-provider/cloud.py
\ No newline at end of file
Property changes on: modules/provider-localscheduler/libexec/gce-cloud-provider/cloud.py
___________________________________________________________________
Added: svn:special
+ *
Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/shell/execution/TaskHandlerImpl.java
===================================================================
--- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/shell/execution/TaskHandlerImpl.java (revision 4040)
+++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/shell/execution/TaskHandlerImpl.java (working copy)
@@ -47,4 +47,4 @@
}
-}
\ No newline at end of file
+}
Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/shell/Properties.java
===================================================================
--- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/shell/Properties.java (revision 4040)
+++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/shell/Properties.java (working copy)
@@ -9,7 +9,7 @@
*/
package org.globus.cog.abstraction.impl.scheduler.shell;
-// import org.apache.log4j.Logger;
+import org.apache.log4j.Logger;
import org.globus.cog.abstraction.impl.scheduler.common.AbstractProperties;
public class Properties extends AbstractProperties {
@@ -28,7 +28,7 @@
properties.put(NAME, name);
return properties;
}
-
+
protected void setDefaults() {
setPollInterval(5);
}
Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/common/AbstractProperties.java
===================================================================
--- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/common/AbstractProperties.java (revision 4040)
+++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/common/AbstractProperties.java (working copy)
@@ -19,11 +19,36 @@
private static final long serialVersionUID = 1L;
public static final Logger logger = Logger.getLogger(AbstractProperties.class);
-
+
public static final String POLL_INTERVAL = "poll.interval";
-
+
public static final String DEBUG = "debug";
-
+
+ private String resolve(String var) {
+ String v = null;
+ if (var.startsWith("env.")) {
+ v = System.getenv(var.substring(4));
+ }
+ else {
+ v = System.getProperty(var);
+ }
+ if (v == null) {
+ throw new IllegalArgumentException("No such system property or environment variable: '" + var + "'");
+ }
+ return v;
+ }
+
+ private String loadenv(String what) {
+ int b = what.indexOf("${");
+ while (b != -1) {
+ int e = what.indexOf("}", b);
+ String var = what.substring(b + 2, e);
+ what = what.substring(0, b) + resolve(var) + what.substring(e + 1);
+ b = what.indexOf("${");
+ }
+ return what;
+ }
+
protected void load(String name) {
setDefaults();
InputStream is = getClass().getClassLoader().getResourceAsStream(name);
@@ -33,6 +58,11 @@
else {
try {
super.load(is);
+ for (String key: super.stringPropertyNames()){
+ String value = super.getProperty(key);
+ String resolved = loadenv(value);
+ super.setProperty(key, resolved);
+ }
}
catch (IOException e) {
}
Index: modules/provider-localscheduler/resources/cog-provider.properties
===================================================================
--- modules/provider-localscheduler/resources/cog-provider.properties (revision 4040)
+++ modules/provider-localscheduler/resources/cog-provider.properties (working copy)
@@ -38,3 +38,8 @@
sandbox=false
executionTaskHandler=org.globus.cog.abstraction.impl.scheduler.shell.execution.TaskHandlerImpl
securityContext=org.globus.cog.abstraction.impl.common.task.SecurityContextImpl
+
+provider=gce-cloud
+sandbox=false
+executionTaskHandler=org.globus.cog.abstraction.impl.scheduler.shell.execution.TaskHandlerImpl
+securityContext=org.globus.cog.abstraction.impl.common.task.SecurityContextImpl
Index: modules/provider-localscheduler/etc/provider-gce-cloud.properties
===================================================================
--- modules/provider-localscheduler/etc/provider-gce-cloud.properties (revision 0)
+++ modules/provider-localscheduler/etc/provider-gce-cloud.properties (revision 4041)
@@ -0,0 +1,3 @@
+submit.command=${env.SWIFT_HOME}/libexec/gce-cloud-provider/stsubmit.sh
+cancel.command=${env.SWIFT_HOME}/libexec/gce-cloud-provider/stcancel.sh
+poll.command=${env.SWIFT_HOME}/libexec/gce-cloud-provider/ststat.sh
\ No newline at end of file
Index: modules/provider-localscheduler/etc/provider-ec2-cloud.properties
===================================================================
--- modules/provider-localscheduler/etc/provider-ec2-cloud.properties (revision 4040)
+++ modules/provider-localscheduler/etc/provider-ec2-cloud.properties (working copy)
@@ -1,3 +1,3 @@
-submit.command=/home/yadu/src/swift-trunk/cog/modules/provider-localscheduler/examples/ec2-cloud-provider/stsubmit
-cancel.command=/home/yadu/src/swift-trunk/cog/modules/provider-localscheduler/examples/ec2-cloud-provider/stcancel
-poll.command=/home/yadu/src/swift-trunk/cog/modules/provider-localscheduler/examples/ec2-cloud-provider/ststat
\ No newline at end of file
+submit.command=${env.SWIFT_HOME}/libexec/ec2-cloud-provider/stsubmit.sh
+cancel.command=${env.SWIFT_HOME}/libexec/ec2-cloud-provider/stcancel.sh
+poll.command=${env.SWIFT_HOME}/libexec/ec2-cloud-provider/ststat.sh
\ No newline at end of file
More information about the Swift-commit
mailing list