Skip to content

Commit

Permalink
Merge branch 'b2.1' of https://github.com/opensvc/opensvc into b2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cvaroqui committed Jul 8, 2021
2 parents 5d5ca20 + 51d9aa2 commit 0ffbe2e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions opensvc/drivers/resource/app/__init__.py
Expand Up @@ -447,13 +447,20 @@ def start(self):
ret = self.run("start", cmd)
if ret != 0:
raise ex.Error("exit code %d" % ret)

def iu():
try:
r = self.is_up()
except StatusNA:
r = core.status.NA
except:
r = core.status.DOWN
if r == core.status.NA:
self.log.info("stop waiting for resource status up (currently n/a)")
return r in (core.status.UP, core.status.NA)

if self.start_timeout is not None:
self.log.info("wait for resource status up")
self.wait_for_fn(iu, self.start_timeout, 1)
self.can_rollback = True

Expand Down

0 comments on commit 0ffbe2e

Please sign in to comment.