X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Flinux%2Fapplication.py;h=a83393d727862b94fae124b91902cbee443b64e3;hb=4fea45903bd5ae406ea9965bdec3ada7119d0ea1;hp=8cac699ae612d4d36e70f1dfcb36e9aac23c8100;hpb=752d0aaffb889011159fef73c02d838e538d7144;p=nepi.git diff --git a/src/nepi/resources/linux/application.py b/src/nepi/resources/linux/application.py index 8cac699a..a83393d7 100644 --- a/src/nepi/resources/linux/application.py +++ b/src/nepi/resources/linux/application.py @@ -319,7 +319,7 @@ class LinuxApplication(ResourceManager): super(LinuxApplication, self).do_provision() - def upload_start_command(self): + def upload_start_command(self, overwrite = False): # Upload command to remote bash script # - only if command can be executed in background and detached command = self.get("command") @@ -339,7 +339,7 @@ class LinuxApplication(ResourceManager): self.node.upload_command(command, shfile = shfile, env = env, - overwrite = False) + overwrite = overwrite) def execute_deploy_command(self, command): if command: @@ -491,8 +491,8 @@ class LinuxApplication(ResourceManager): if not command: # If no command was given (i.e. Application was used for dependency - # installation), then the application is directly marked as FINISHED - super(LinuxApplication, self).do_finish() + # installation), then the application is directly marked as STOPPED + super(LinuxApplication, self).set_stopped() else: if self.in_foreground: self._run_in_foreground() @@ -636,7 +636,7 @@ class LinuxApplication(ResourceManager): self.do_fail() elif retcode == 0: - self.do_finish() + self.set_stopped() else: # We need to query the status of the command we launched in # background. In order to avoid overwhelming the remote host and @@ -660,7 +660,7 @@ class LinuxApplication(ResourceManager): self.error(msg, out, err) self.do_fail() else: - self.do_finish() + self.set_stopped() self._last_state_check = tnow()