installer 1.36.1: http_code prints one status (R-1284, red-proved; committed, not published); R-1285 (BYO drop-in removed one bundle late), R-1286 (demo-hp kimai held since 10-14); release-2026-10-26 evidence: BYO proof, the three boxes on 0.343.0, Homepage gate on the drill
gates / gates (push) Successful in 12m58s
gates / gates (push) Successful in 12m58s
This commit is contained in:
1 parent
ade357a14e
commit
36ef8dcdec
20 files changed
+1750
-9
No files matched your search
@@ -1,3 +1,13 @@
|
||||
## 2026-10-25 — installer 1.36.1: the preflight words a refusal again (committed, NOT published)
|
||||
|
||||
- **`felhom-host-install.sh` `http_code`** printed the status twice on a 4xx (`curl -f` prints `-w` and exits 22, and the
|
||||
`|| curl …` fallback printed it again: „401401"), so the preflight's 401 („passphrase REJECTED"), 404 („customer not
|
||||
found") and 409 (R-1167's „this customer already has a live box") branches never matched — every refusal read
|
||||
„unexpected hub status 401401". Seen live on the BYO test VM (attended release run 2026-10-25). Now one curl without
|
||||
`-f`, `|| true`. `test_hostinstall.py`: `test_http_code_prints_one_status_on_a_refusal` (seen failing on the old helper,
|
||||
`documentation/audits/release-2026-10-26/redproof/installer-http-code-doubled.txt`). **Not published:** the public
|
||||
script follows the `installer-v*` tag; a publish needs the tag and the webpage sync (felhom.eu R-1284).
|
||||
|
||||
## 2026-10-24 — `ep0-iperf3/`: the tunnel-only line-speed test server on ep0 (R-1247; operator ruling 2026-10-24 07:26)
|
||||
|
||||
- **`ep0-iperf3/felhom-iperf3.service`** (new, installed by hand on ep0 2026-10-24): Debian's `iperf3 --server` bound to
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_VERSION="1.36.0" # the SINGLE version source (F-1): -h and the run banners follow it.
|
||||
SCRIPT_VERSION="1.36.1" # the SINGLE version source (F-1): -h and the run banners follow it.
|
||||
# The hub used to carry a copy for its Setup tab; R-94 DELETED it
|
||||
# (2026-08-02) because the hub cannot know which version a box runs —
|
||||
# the Setup command fetches this script at run time. scripts/
|
||||
@@ -453,8 +453,10 @@ _state_get() {
|
||||
STATE_FILE="$STATE_FILE" python3 -c "import json,os,sys;d=json.load(open(os.environ['STATE_FILE']));print(d.get(sys.argv[1],''))" "$1" 2>/dev/null
|
||||
}
|
||||
|
||||
http_code() { # GET, prints status code only (read-only preflight)
|
||||
curl -fsS -o /dev/null -w '%{http_code}' "$@" 2>/dev/null || curl -sS -o /dev/null -w '%{http_code}' "$@" 2>/dev/null
|
||||
http_code() { # GET, prints ONE status code (read-only preflight); 000 when nothing answered
|
||||
# No `-f`: with it curl prints the code AND exits 22 on a 4xx, and the old `|| curl …` fallback printed it a second
|
||||
# time („401401") — the preflight's 401/404/409 branches never matched (test_http_code_prints_one_status_on_a_refusal).
|
||||
curl -sS -o /dev/null -w '%{http_code}' "$@" 2>/dev/null || true
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
@@ -700,6 +700,32 @@ def test_internal_place_runs_after_the_bundle_and_before_provision():
|
||||
assert -1 < i_bundle < i_place < i_prov, (i_bundle, i_place, i_prov)
|
||||
|
||||
|
||||
# ── http_code prints ONE status (found 2026-10-25, attended release run) ─────────────────────────────────────────────
|
||||
# With `-f`, curl prints -w's code AND exits 22 on a 4xx, so the old `curl -f … || curl …` printed the code twice
|
||||
# („401401"): the preflight's 401 / 404 / 409 branches never matched and every refusal read „unexpected hub status".
|
||||
def _http_code_with(status):
|
||||
sb = Sandbox()
|
||||
try:
|
||||
# a curl stub that answers like the real one: -w prints the status; -f makes a 4xx/5xx exit 22
|
||||
body = ('f=0; for a in "$@"; do case "$a" in --*) ;; -*f*) f=1;; esac; done\n'
|
||||
'printf "%s" STATUS\n[ "$f" = 1 ] && [ STATUS -ge 400 ] && exit 22\nexit 0').replace("STATUS", status)
|
||||
sb.stub("curl", body)
|
||||
rc, out = sb.run(func("http_code") + 'c=$(http_code https://hub.invalid/api/v1/config/x -H "X: y"); printf "[%s]" "$c"')
|
||||
return out
|
||||
finally:
|
||||
sb.close()
|
||||
|
||||
|
||||
def test_http_code_prints_one_status_on_a_refusal():
|
||||
for status in ("401", "404", "409"):
|
||||
out = _http_code_with(status)
|
||||
assert out.endswith("[%s]" % status), "http_code printed %r for a %s (the preflight's case never matches)" % (out, status)
|
||||
|
||||
|
||||
def test_http_code_prints_the_status_on_success():
|
||||
assert _http_code_with("200").endswith("[200]")
|
||||
|
||||
|
||||
def main():
|
||||
tests = [(n, f) for n, f in sorted(globals().items()) if n.startswith("test_") and callable(f)]
|
||||
fails = 0
|
||||
|
||||
Reference in new issue
Block a user