From: Alina Quereilhac <alina.quereilhac@inria.fr> Date: Tue, 18 Feb 2014 18:55:05 +0000 (+0100) Subject: Minor fixes X-Git-Tag: nepi-3.1.0~116 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=73a0a1e3fb2d042740263ccaf1a5e6e56043a909;p=nepi.git Minor fixes --- diff --git a/src/nepi/execution/ec.py b/src/nepi/execution/ec.py index 7d8b990b..71478233 100644 --- a/src/nepi/execution/ec.py +++ b/src/nepi/execution/ec.py @@ -754,6 +754,11 @@ class ExperimentController(object): rm = self.get_resource(guid) self.schedule("0s", rm.start_with_conditions) + if rm.conditions.get(ResourceAction.STOP): + # Only if the RM has STOP conditions we + # schedule a stop. Otherwise the RM will stop immediately + self.schedule("0s", rm.stop_with_conditions) + if wait_all_ready and new_group: # Schedule a function to check that all resources are # READY, and only then schedule the start. @@ -772,10 +777,10 @@ class ExperimentController(object): if not wait_all_ready: self.schedule("0s", rm.start_with_conditions) - if rm.conditions.get(ResourceAction.STOP): - # Only if the RM has STOP conditions we - # schedule a stop. Otherwise the RM will stop immediately - self.schedule("0s", rm.stop_with_conditions) + if rm.conditions.get(ResourceAction.STOP): + # Only if the RM has STOP conditions we + # schedule a stop. Otherwise the RM will stop immediately + self.schedule("0s", rm.stop_with_conditions) def release(self, guids = None): """ Releases all ResourceManagers in the guids list. diff --git a/src/nepi/resources/linux/traceroute.py b/src/nepi/resources/linux/traceroute.py index 5e592a87..3c3310a9 100644 --- a/src/nepi/resources/linux/traceroute.py +++ b/src/nepi/resources/linux/traceroute.py @@ -18,7 +18,7 @@ # Author: Alina Quereilhac <alina.quereilhac@inria.fr> from nepi.execution.attribute import Attribute, Flags, Types -from nepi.execution.resource import clsinit_copy, failtrap +from nepi.execution.resource import clsinit_copy from nepi.resources.linux.application import LinuxApplication from nepi.util.timefuncs import tnow @@ -64,15 +64,14 @@ class LinuxTraceroute(LinuxApplication): super(LinuxTraceroute, self).__init__(ec, guid) self._home = "traceroute-%s" % self.guid - @failtrap - def deploy(self): + def do_deploy(self): if not self.get("command"): self.set("command", self._start_command) if not self.get("depends"): self.set("depends", "traceroute") - super(LinuxTraceroute, self).deploy() + super(LinuxTraceroute, self).do_deploy() @property def _start_command(self):