Skip to content

Commit

Permalink
chore: add helper comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon committed Sep 13, 2024
1 parent a7a210d commit d0f8fc5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -645,12 +645,16 @@ def _wait_runner_startup(self, instance: OpenstackInstance) -> None:
"cloud-init status command failed on %s: %s.", instance.server_name, result.stderr
)
raise RunnerStartError(f"Runner startup process not found on {instance.server_name}")
# A short running job may have already completed and exited the runner, hence check the
# condition via cloud-init status check.
if CloudInitStatus.DONE in result.stdout:
return
result = ssh_conn.run("ps aux", warn=True)
if not result.ok:
logger.warning("SSH run of `ps aux` failed on %s", instance.server_name)
raise RunnerStartError(f"Unable to SSH run `ps aux` on {instance.server_name}")
# Runner startup process is the parent process of runner.Listener and runner.Worker which
# starts up much faster.
if RUNNER_STARTUP_PROCESS not in result.stdout:
logger.warning("Runner startup process not found on %s", instance.server_name)
raise RunnerStartError(f"Runner startup process not found on {instance.server_name}")
Expand Down

0 comments on commit d0f8fc5

Please sign in to comment.