Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

further changes to integrate lan torrent

  • Loading branch information...
commit 9993e54a544cea76bd9d95c56edd8fa420fd10ce 1 parent 9fdfa06
BuzzTroll authored
View
1  control/etc/workspace-control/propagation.conf
@@ -42,4 +42,5 @@ http: false
#hdfs: /usr/bin/hadoop
lantorrent: true
+lantorrentport: 5893
ssh: /usr/bin/ssh
View
12 control/src/python/workspacecontrol/defaults/imageprocurement/propagate_virga.py
@@ -12,6 +12,8 @@ class LantorrentPropadapter(propagate_scp.propadapter):
def __init__(self, params, common):
propagate_scp.propadapter.__init__(self, params, common)
self.ssh = None
+ self.ltport = 5893
+ self.ltip = None
self.scheme = "lantorrent://"
def validate(self):
@@ -19,6 +21,14 @@ def validate(self):
propagate_scp.propadapter.validate(self)
self.c.log.debug("validating lantorrent propagation adapter")
+ self.ltip = self.p.get_conf_or_none("propagation", "lantorrentip")
+ if not self.ltip:
+ self.ltip = socket.gethostbyname(socket.gethostname())
+
+ self.ltport = self.p.get_conf_or_none("propagation", "lantorrentport")
+ if not self.ltport:
+ self.ltport = 5893
+
self.ssh = self.p.get_conf_or_none("propagation", "ssh")
if not self.ssh:
raise InvalidConfig("no path to ssh")
@@ -121,7 +131,7 @@ def _lt_command(self, local, remote):
xfer_user = xfer_user + "@"
else:
xfer_user = ""
- cmd = self.ssh + " -p %d %s%s %s %s %s %s %d" % (xfer_port, xfer_user, xfer_host, lt_exe, xfer_path, local, group_id, group_count)
+ cmd = self.ssh + " -p %d %s%s %s %s %s %s %d %s %d" % (xfer_port, xfer_user, xfer_host, lt_exe, xfer_path, local, group_id, group_count, self.ltip, self.ltport)
self.c.log.debug("lantorrent command %s " % (cmd))
View
14 install
@@ -140,4 +140,16 @@ fi
$NIMBUS_SRC/libexec/install-real.sh "${@}" 2>&1 | tee -a $NIMBUS_HOME/install.log
# need PIPESTATUS because tee is not the exit code of interest
-exit $PIPESTATUS
+rc=$PIPESTATUS
+if [ $rc -ne 0 ]; then
+ exit $rc
+fi
+
+echo "installing lantorrent"
+$NIMBUS_SRC/lantorrent/install.sh | tee -a $NIMBUS_HOME/install.log
+rc=$PIPESTATUS
+if [ $rc -ne 0 ]; then
+ echo "lantorrent install failed"
+ exit $rc
+fi
+exit 0
View
3  lantorrent/install.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+cp -r `pwd` $NIMBUS_HOME/
Please sign in to comment.
Something went wrong with that request. Please try again.