Make the airgap-verify positive control follow the instance's scheme

The defect

On an omnibus instance moved to https with https-private-ca, airgap-verify reports FAIL GitLab did not serve /users/sign_in (curl exit 7). The instance is healthy. The positive control assumed http://127.0.0.1, and after the move port 80 is closed, so curl could not connect.

Rig reproduction

One omnibus rig, sealed with airgap-seal.

  • Control, before the https move, old script: positive control passes.
  • Control, after https-private-ca, old script: the sign-in check fails with curl exit 7 and the control ends FAILED (1 check(s)).
  • Fixed script, before the move: passes over http.
  • Fixed script, after the move, with the full reconfigure under the seal: instance answers on https://<ip> (checked through 127.0.0.1:443), sign-in rendered 200 over https, and the control ends PASSED.

The fix

airgap-verify-omnibus.sh reads the scheme, host and port from gitlab.yml (and the relative URL root, if set). It connects to the local nginx on that port with --connect-to, keeping the external host in the URL, so certificate verification still applies. The readiness probe uses the same URL. The check names the URL it tested, and exits non-zero when it cannot read the settings, so an unreadable instance cannot pass.

A stubbed selftest, airgap-verify-omnibus-selftest.sh, covers http, https and the unreadable case. It is registered in the justfile selftest loop and goes red against the old script on the url, scheme, connect-to and https cases.

Merge request reports

Loading
Loading