diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2018-01-12 16:32:23 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-01-12 16:32:23 +0100 |
commit | 2339186cd753a9d3ea7e3c081c9991d3368077c5 (patch) | |
tree | 9c14dec19632b7cb54b95fb910511ac40275bab2 | |
parent | 89cb2a104bb04351c93b92c8f312e6c22fd89326 (diff) | |
parent | 91c87d35e3c9eeee43788f4acab2e6567bbb9c7d (diff) | |
download | rumba-2339186cd753a9d3ea7e3c081c9991d3368077c5.tar.gz rumba-2339186cd753a9d3ea7e3c081c9991d3368077c5.zip |
Merge branch 'master' into testing
-rw-r--r-- | rumba/testbeds/jfed.py | 50 |
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") |