From: Alina Quereilhac Date: Sat, 31 May 2014 17:12:30 +0000 (+0200) Subject: Making Linux Ping start as early as deployment X-Git-Tag: nepi-3.1.0~53 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f93ec5546fecba66a91ea52b9dbc0ec5f0c23201;p=nepi.git Making Linux Ping start as early as deployment --- diff --git a/src/nepi/resources/linux/ping.py b/src/nepi/resources/linux/ping.py index 0031e187..47f46b77 100644 --- a/src/nepi/resources/linux/ping.py +++ b/src/nepi/resources/linux/ping.py @@ -192,29 +192,10 @@ class LinuxPing(LinuxApplication): self._home = "ping-%s" % self.guid def upload_start_command(self): + super(LinuxPing, self).upload_start_command() + if self.get("earlyStart") == True: - command = self.get("command") - env = self.get("env") - - # We want to make sure the FIB entries are created - # before the experiment starts. - # Run the command as a bash script in the background, - # in the host ( but wait until the command has - # finished to continue ) - env = env and self.replace_paths(env) - command = self.replace_paths(command) - - # ccndc seems to return exitcode OK even if a (dns) error - # occurred, so we need to account for this case here. - (out, err), proc = self.execute_command(command, - env, blocking = True) - - if proc.poll(): - msg = "Failed to execute command" - self.error(msg, out, err) - raise RuntimeError, msg - else: - super(LinuxPing, self).upload_start_command() + self._run_in_background() def do_deploy(self): if not self.get("command"):