Recover prior accepted backend within CI provisioning after pre-start failure
Deploy Canina / deploy (push) Failing after 1m44s

This commit is contained in:
devops committed 2026-10-23 18:28:44 +00:00
1 parent 62a7a87378
commit 4388a5c2e6
1 file changed
+5
+5
View File
@@ -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'):