Make restore wait for sign-in on omnibus too
What
restore now waits for the sign-in page to answer 200 from outside the VM on every base that runs a GitLab, not only caproni. Closes #47 (closed).
Why
On omnibus, restore printed that the rig was back about 15 seconds before sign-in returned 200. The page answered 000 or 502 while Puma started, so a caller that signed in at once failed.
How
settle_restored asks external_http_once, the question the up gate asks, at the address up asks it: the VM address, or the lab host name when --host named one. The bound is SIM_RESTORE_SERVE_SECONDS (900). A failure names what answered and points at gitlab-ctl status on omnibus. A rig with no GitLab (no recorded gitlab_url) and the dev base, which has no endpoint, return at once. Caproni still replaces the svclb pods first.
Proof
- Selftest: an omnibus restore whose probe answers 502, 502, then 200 goes red on
main(7 checks fail) and green here; it covers the bound, the failure text, the probed address and host, a rig with no GitLab, and the dev base. - Live omnibus restore: in a comment below.
Diagram
None. The change is one wait loop in an existing function; a picture would restate the loop.