BMC hints: the password stays on the region
CI / agent (push) Successful in 3s
CI / site (push) Successful in 2s
CI / go (push) Successful in 41s

GET /api/v1/bmc-hint answered with the BMC password to anyone with the
agent token (public on the PXE command line) and a MAC (visible on the
wire). It now returns the address and user only. When a machine reports
in, the region matches its MACs against bmc_hints itself, seals the
configured password into the record, and checks the BMC with a status
call from the rack controller (verified_oob). The agent skips its own
check when no password comes; old agents keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-29 21:28:00 +01:00
1 parent a495c33b66
commit e474fbcf16
4 files changed
+102 -18

No files matched your search

+6 -1
View File
@@ -416,7 +416,12 @@ def bmc_hint(server, macs):
if not h or not h.get("address"):
return None
res = {"source": "hint", "address": h["address"], "port": h.get("port", 623),
"user": h.get("user"), "password": h.get("password"), "errors": []}
"user": h.get("user"), "errors": []}
if not h.get("password"):
# the region keeps the credentials and checks the BMC itself (rollcall >= 0.3)
res["configured"] = True
return res
res["password"] = h["password"]
base = ["-I", "lanplus", "-H", h["address"], "-p", str(h.get("port", 623)), "-U", h.get("user", ""),
"-P", h.get("password", "")]
rc, mc = ipmi(base + ["mc", "info"], timeout=20)