aboutsummaryrefslogtreecommitdiff
path: root/rumba
diff options
context:
space:
mode:
authorMarco Capitani <m.capitani@nextworks.it>2017-06-01 17:34:53 +0200
committerMarco Capitani <m.capitani@nextworks.it>2017-06-01 17:34:53 +0200
commitc92408dc0a74e2ca1ef47cc721ad41dff614aaa4 (patch)
tree067acf362c8a52486e95e8e08ec13e1dcdb82c01 /rumba
parent30dbd8b5493480d2c302380735083c2d9b8f8260 (diff)
downloadrumba-c92408dc0a74e2ca1ef47cc721ad41dff614aaa4.tar.gz
rumba-c92408dc0a74e2ca1ef47cc721ad41dff614aaa4.zip
Model: corrected no-proxy case. rlite: removed hardcoded proxy
Diffstat (limited to 'rumba')
-rw-r--r--rumba/model.py2
-rw-r--r--rumba/prototypes/rlite.py10
-rw-r--r--rumba/ssh_support.py9
3 files changed, 13 insertions, 8 deletions
diff --git a/rumba/model.py b/rumba/model.py
index 27fcc23..6508c86 100644
--- a/rumba/model.py
+++ b/rumba/model.py
@@ -48,8 +48,6 @@ class Testbed:
self.password = password
self.proj_name = proj_name
self.exp_name = exp_name
- if http_proxy is None:
- http_proxy = ""
self.http_proxy = http_proxy
@abc.abstractmethod
diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py
index 625668d..de2ba52 100644
--- a/rumba/prototypes/rlite.py
+++ b/rumba/prototypes/rlite.py
@@ -38,6 +38,10 @@ class Experiment(mod.Experiment):
ssh.execute_commands(self.testbed, node.ssh_config,
cmds, time_out=None)
+ def execute_proxy_commands(self, node, cmds):
+ ssh.execute_proxy_commands(self.testbed, node.ssh_config,
+ cmds, time_out=None)
+
# Prepend sudo to all commands if the user is not 'root'
def may_sudo(self, cmds):
if self.testbed.username != 'root':
@@ -117,17 +121,17 @@ class Experiment(mod.Experiment):
def install_prototype(self):
logger.info("installing rlite on all nodes")
cmds = ["sudo apt-get update",
- "export https_proxy=\"https://proxy.atlantis.ugent.be:8080\"; sudo -E apt-get install g++ gcc cmake "
+ "sudo -E apt-get install g++ gcc cmake "
"linux-headers-$(uname -r) "
"protobuf-compiler libprotobuf-dev git --yes",
"rm -rf ~/rlite",
- "cd ~; export https_proxy=\"https://proxy.atlantis.ugent.be:8080\"; git clone https://github.com/vmaffione/rlite",
+ "cd ~; git clone https://github.com/vmaffione/rlite",
"cd ~/rlite && ./configure && make && sudo make install",
"cd ~/rlite && sudo make depmod"
]
for node in self.nodes:
- self.execute_commands(node, cmds)
+ self.execute_proxy_commands(node, cmds)
logger.info("installation complete")
def bootstrap_prototype(self):
diff --git a/rumba/ssh_support.py b/rumba/ssh_support.py
index 93a48f8..f8ba03b 100644
--- a/rumba/ssh_support.py
+++ b/rumba/ssh_support.py
@@ -59,9 +59,12 @@ def execute_proxy_commands(testbed, ssh_config, commands, time_out=3):
new_commands = []
for command in commands:
proxy = testbed.http_proxy
- proxy_command = 'export http_proxy=' + proxy + '; ' \
- + 'export https_proxy=' + proxy + ';'
- new_commands.append(proxy_command + ' ' + command)
+ if proxy is not None:
+ proxy_command = 'export http_proxy=' + proxy + '; ' \
+ + 'export https_proxy=' + proxy + ';'
+ new_commands.append(proxy_command + ' ' + command)
+ else:
+ new_commands.append(command)
return execute_commands(testbed, ssh_config, new_commands, time_out)