aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rumba/testbeds/jfed.py50
1 files changed, 31 insertions, 19 deletions
diff --git a/rumba/testbeds/jfed.py b/rumba/testbeds/jfed.py
index ac54042..5bf07d4 100644
--- a/rumba/testbeds/jfed.py
+++ b/rumba/testbeds/jfed.py
@@ -195,10 +195,13 @@ class Testbed(mod.Testbed):
file.close()
def swap_out(self, experiment):
- subprocess.call(["java", "-jar", self.jfed_jar, "delete", "-S",
- self.proj_name, "-s",
- self.exp_name, "-p", self.cert_file,
- "-P", self.password])
+ try:
+ subprocess.check_call(["java", "-jar", self.jfed_jar, "delete",
+ "-S", self.proj_name, "-s", self.exp_name,
+ "-p", self.cert_file, "-P", self.password])
+ except subprocess.CalledProcessError as e:
+ logger.error("jFed returned with error " + str(e.returncode))
+ raise
def swap_in(self, experiment):
for node in experiment.nodes:
@@ -211,23 +214,32 @@ class Testbed(mod.Testbed):
node.ssh_config.username = self.username
node.ssh_config.password = self.password
- subprocess.call(["java", "-jar", self.jfed_jar, "create", "-S",
- self.proj_name, "--rspec",
- self.rspec, "-s",
- self.exp_name, "-p", self.cert_file, "-k",
- "usercert,userkeys,shareduserallkeys",
- "--create-slice",
- "--manifest", self.manifest,
- "-P", self.password,
- "-e", self.exp_hours])
+ logger.info("Launching jFed...")
+
+ try:
+ subprocess.check_call(["java", "-jar", self.jfed_jar, "create",
+ "-S", self.proj_name, "--rspec",
+ self.rspec, "-s", self.exp_name, "-p",
+ self.cert_file, "-k",
+ "usercert,userkeys,shareduserallkeys",
+ "--create-slice", "--manifest",
+ self.manifest, "-P", self.password,
+ "-e", self.exp_hours])
+ except subprocess.CalledProcessError as e:
+ logger.error("jFed returned with error " + str(e.returncode))
+ raise
if "exogeni" in self.auth_name:
- subprocess.call(["java", "-jar", self.jfed_jar,
- "manifest", "-S", self.proj_name,
- "-s", self.exp_name,
- "-p", self.cert_file,
- "--manifest", self.manifest,
- "-P", self.password])
+ try:
+ subprocess.check_call(["java", "-jar", self.jfed_jar,
+ "manifest", "-S", self.proj_name,
+ "-s", self.exp_name,
+ "-p", self.cert_file,
+ "--manifest", self.manifest,
+ "-P", self.password])
+ except subprocess.CalledProcessError as e:
+ logger.error("jFed returned with error " + str(e.returncode))
+ raise
rspec = xml.parse(self.manifest)
xml_nodes = rspec.getElementsByTagName("node")