diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2018-06-12 16:40:11 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-06-12 16:40:11 +0200 |
commit | cd34f0b66e7981490bd50752abe68ea11481963c (patch) | |
tree | d65a196c996dd8ec207789601f8ce8e3c9b5fa5f /rumba/utils.py | |
parent | b1354ee6dfc5d77b631348356fb823d1c1a85e02 (diff) | |
download | rumba-cd34f0b66e7981490bd50752abe68ea11481963c.tar.gz rumba-cd34f0b66e7981490bd50752abe68ea11481963c.zip |
elements: Add terminate prototype and reboot nodes
This adds functions to terminate the prototype gracefully or
forcefully, and to reboot all nodes in the experiment. This is useful
when running the experiment interactively, so swapping out and back in
is not always required.
Diffstat (limited to 'rumba/utils.py')
-rw-r--r-- | rumba/utils.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rumba/utils.py b/rumba/utils.py index 88ea0d3..822deb3 100644 --- a/rumba/utils.py +++ b/rumba/utils.py @@ -29,6 +29,7 @@ import os import rumba.log as log import rumba.model as model +import rumba.testbeds.local as local # Fix input reordering try: @@ -204,7 +205,11 @@ class ExperimentManager(object): # Swap out if do_swap_out: - self.experiment.swap_out() + # Kill prototype in case of local testbed + if isinstance(self.experiment.testbed, local.Testbed): + self.experiment.terminate_prototype() + else: + self.experiment.swap_out() if exc_val is not None: logger.error('Something went wrong. ' 'Got %s: %s', |