diff --git a/scripts/rollout-stage.sh b/scripts/rollout-stage.sh index a94e0078..5e4f2eba 100644 --- a/scripts/rollout-stage.sh +++ b/scripts/rollout-stage.sh @@ -18,6 +18,11 @@ m=importlib.util.module_from_spec(spec);spec.loader.exec_module(m) m.ci_gate() def inspect(name): return json.loads(docker('inspect',name))[0] b=inspect('canino_backend_stage') +# A failed pre-start rollout may leave the previously accepted backend stopped. +# Resume that existing container only inside serialized CI, before provisioning reads. +if not b['State'].get('Running'): + docker('start','canino_backend_stage') + b=inspect('canino_backend_stage') if not b['State'].get('Running') or b['State'].get('Pid',0) <= 0: raise ValueError('Running backend required') if b['Config']['User'] not in ('node','1000','1000:1000') or b['HostConfig'].get('UsernsMode') not in ('','default'):