Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

changing how arguments get to lantorrent adapter. is generally useful…

… for any propagation adapter. we can want to figure out a way to sub in envs
  • Loading branch information...
commit fb92121f6e4570296c601f61b4df47be737924f1 1 parent dc7f296
BuzzTroll authored
View
1  control/etc/workspace-control/propagation.conf
@@ -48,3 +48,4 @@ lantorrentport: 2893
# come from the SSH_CLIENT env
#lantorrentip: x.x.x.x
ssh: /usr/bin/ssh
+lantorrentexe: /opt/nimbus/bin/ltclient.sh
View
12 control/src/python/workspacecontrol/defaults/imageprocurement/propagate_lantorrent.py
@@ -32,7 +32,7 @@ def validate(self):
if not self.ltport:
self.ltport = 2893
- self.ssh = self.p.get_conf_or_none("propagation", "ssh")
+ self.ssh = self.p.get_conf_or_none("propagation", "lantorrent")
if not self.ssh:
raise InvalidConfig("no path to ssh")
@@ -94,12 +94,10 @@ def _lt_command(self, local, remote):
if remote[:len(self.scheme)] != self.scheme:
raise InvalidInput("get command invalid lantorrent url, not %s %s" % (self.scheme, remote))
- ra = remote.split("?", 1)
- if len(ra) != 2:
- raise InvalidInput("invalid lantorrent url, %s. It must contain parameters the remoteexe" % (remote))
-
- url = ra[0]
- lt_exe = ra[1]
+ url = remote
+ lt_exe = self.p.get_arg_or_none(wc_args.EXTRA_ARGS)
+ if lt_exe == None:
+ raise InvalidInput("the extra-args parameter must be used and be a path to the remote execution script")
up = urlparse.urlparse(url)
xfer_host = up.hostname
View
4 control/src/python/workspacecontrol/main/wc_args.py
@@ -69,6 +69,10 @@ def __repr__(self):
DRYRUN.help = "Do as little as possible 'for real', will still affect filesystem, for example logs and information persistence"
a.append(DRYRUN)
+EXTRA_ARGS = ControlArg("extra-args", None)
+EXTRA_ARGS.help = "addition arguments passed to the propagation adapter. The format is deterimed by the propagation adapter in use."
+a.append(EXTRA_ARGS)
+
KERNEL = ControlArg("kernel", "-k", metavar="FILENAME (not path)")
KERNEL.help = "Override the configured kernel"
a.append(KERNEL)
View
1  service/service/java/source/etc/workspace-service/other/authz-callout-ACTIVE.xml
@@ -39,7 +39,6 @@
<property name="repoHost" value="$SSH{service.sshd.contact.string}" />
<property name="repoScheme" value="scp" />
<property name="passthroughSchemes" value="file,hdfs" />
- <property name="lantorrentFetchPath" value="$COMMON{lantorrent.fetch.path}" />
</bean>
<bean id="nimbus-rm.service.binding.RepoAdaptor"
View
1  service/service/java/source/etc/workspace-service/other/authz-callout-sql.xml
@@ -39,7 +39,6 @@
<property name="repoHost" value="$SSH{service.sshd.contact.string}" />
<property name="repoScheme" value="scp" />
<property name="passthroughSchemes" value="file,hdfs" />
- <property name="lantorrentFetchPath" value="$COMMON{lantorrent.fetch.path}" />
</bean>
<bean id="nimbus-rm.service.binding.RepoAdaptor"
View
4 service/service/java/source/etc/workspace-service/other/common.conf
@@ -65,6 +65,4 @@ caches.dir=$NIMBUS_HOME/services/var/nimbus/caches
msgsinks.dir=$NIMBUS_HOME/services/var/nimbus/msg-sinks
-lantorrent.fetch.path=$NIMBUS_HOME/lantorrent/bin/lt-request
-
-
+# propagate.extraargs=$NIMBUS_HOME/lantorrent/bin/lt-request
View
3  service/service/java/source/etc/workspace-service/other/main.xml
@@ -454,7 +454,7 @@
-->
<property name="pollScript"
value="$COMMON{msgsinks.dir}/notifications" />
-
+ <property name="extraArgs" value="$COMMON{propagate.extraargs}" />
<!--
Milliseconds between polls to find new notifications from
@@ -463,7 +463,6 @@
-->
<property name="watcherDelay" value="500" />
-
<!-- dependencies -->
<constructor-arg ref="nimbus-rm.persistence.PersistenceAdapter" />
<constructor-arg ref="nimbus-rm.home.instance" />
View
23 service/service/java/source/src/org/globus/workspace/service/impls/site/PropagationAdapterImpl.java
@@ -68,6 +68,8 @@
private boolean enabled;
private long watcherDelay = 2000;
+ private String extraArgs = null;
+
// -------------------------------------------------------------------------
// CONSTRUCTOR
// -------------------------------------------------------------------------
@@ -114,10 +116,19 @@ public PropagationAdapterImpl(PersistenceAdapter persistenceAdapter,
// SET CONFIGS
// -------------------------------------------------------------------------
- public void setNotificationInfo(String notifInfo) {
- this.notificationInfo = notifInfo;
+
+ public void setExtraArgs(String extraArgs) {
+ this.extraArgs = extraArgs;
+ }
+
+ public String getExtraArgs() {
+ return this.extraArgs;
}
+ public void setNotificationInfo(String notifInfo) {
+ this.notificationInfo = notifInfo;
+ }
+
public void setPollScript(Resource pollScript) {
this.pollScript = pollScript;
}
@@ -253,7 +264,13 @@ public synchronized void validate() throws Exception {
public ArrayList constructPropagateCommand(VirtualMachine vm) {
try {
- return XenUtil.constructPropagateCommand(vm, this.notify);
+ ArrayList al = XenUtil.constructPropagateCommand(vm, this.notify);
+ if(this.extraArgs != null && !this.extraArgs.trim().equals(""))
+ {
+ al.add("--prop-extra-args");
+ al.add(this.extraArgs);
+ }
+ return al;
} catch (WorkspaceException e) {
return null;
}
View
23 service/service/java/source/src/org/globus/workspace/sqlauthz/AuthzDecisionLogic.java
@@ -39,7 +39,6 @@
private String repoDir = null;
private boolean schemePassthrough;
private String passthroughSchemes = null;
- private Resource lantorrentFetchPathResouce = null;
public AuthzDecisionLogic(
DataSource ds,
@@ -122,18 +121,6 @@ protected String translateCumulus(
String dataKey = this.authDB.getDataKey(fileIds[1]);
rc = scheme + "://" + this.getRepoHost() + "/" + dataKey;
- if(lantorrentFetchPathResouce != null)
- {
- try
- {
- String params = this.lantorrentFetchPathResouce.getFile().getAbsolutePath();
- rc = rc + "?" + params;
- }
- catch(Exception ex)
- {
- throw new AuthorizationException("fetch file doesnt exist");
- }
- }
logger.debug("converted " + objectName + " to " + rc + "scheme " + scheme);
return rc;
@@ -406,16 +393,6 @@ public String getRepoDir()
return this.repoDir;
}
- public void setLantorrentFetchPath(Resource up)
- {
- this.lantorrentFetchPathResouce = up;
- }
-
- public Resource getLantorrentFetchPath()
- {
- return this.lantorrentFetchPathResouce;
- }
-
public void setPassthroughSchemes(String passthroughSchemes)
{
this.passthroughSchemes = passthroughSchemes;
Please sign in to comment.
Something went wrong with that request. Please try again.