Repository navigation
Conversation
There was a problem hiding this comment.
HUMAN DECISION NEEDED — @castrojo: this PR silently converts test-installer-artifact (the recipe CI runs) from direct-kernel/PXE boot to OVMF+USB boot, removing the only PXE-path boot coverage. A human should confirm that coverage loss is intended.
intent-alignment
- The title/body describe only adding
test-installer-boot-usb, but the diff also rewrites the existingtest-installer-artifactboot path:-kernel/-initrd/-appendwith virtio installer disk is replaced by OVMF + xHCI USB + SMBIOS cmdline injection (Justfile:284–304). That makes the new recipe a near-duplicate of the first phase of the old one, and it means CI (docs/skills/ci-tooling.md:140— the shared workflow runsjust test-installer-artifact) no longer exercises the PXE/direct-kernel boot path at all. Undisclosed scope + coverage change.
correctness
test_test_installer_boot_usb_contract(tests/unit/test_installer_contract.py:214–222) asserts substrings against the entire Justfile. Every assertion except"test-installer-boot-usb:"is already satisfied by the identical lines intest-installer-artifact, andassert "var" in justfileis trivially true (e.g.ovmf-vars.fd). The test passes even if the new recipe's qemu invocation is gutted — it verifies nothing about the recipe it names. Same weakness applies to the rewritten assertions at lines 53–58.test-installer-artifactstill copies the PXE kernel/initrd (Justfile:237–238) but nothing uses them after-kernel/-initrdwere dropped — the recipe now hard-fails when PXE artifacts are absent despite not needing them.- The new recipe's qemu run has no
timeout(Justfile:470), unlike theINSTALLER_TIMEOUTwrapper added totest-installer-artifact(Justfile:288–289); a hung installer blocks forever. unattendedmode now depends solely on SMBIOSio.systemd.stub.kernel-cmdline-extra(Justfile:301, 482) reaching/proc/cmdline; no contract test asserts that injection, though the installer keys off it (elements/oci/bluefin-server-installer.bst, the/proc/cmdlineunattended check).
style
- ~90 lines (OVMF discovery, qemu invocation, partition validation) are copy-pasted between the two recipes (Justfile:413–497 vs 227–316).
- The new recipe's failure path deletes
$WORKDIRunconditionally (Justfile:420), whiletest-installer-artifactdeliberately retains artifacts on failure (Justfile:328) — debugging a failed USB boot loses everything. - No blank line between the new recipe's last line and the
install-vmcomment (Justfile:497–498), breaking the file's recipe-separation convention.
docs-currency
docs/skills/ci-tooling.md:140still says the installer boot test "Uploads the already-built installer and PXE artifacts" fortest-installer-artifact— the PXE artifacts are no longer booted.- The recipe list in
docs/skills/ddi-installer-build.md:29–34doesn't mention the newtest-installer-boot-usbrecipe, and the newSHOW_ME_THE_FUTURE_INSTALL_TIMEOUTknob is undocumented.
No findings from: security.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
1d2c41d to
c759692
Compare
…B OVMF testing Attach installer media via emulated xHCI USB drive in QEMU and boot via OVMF firmware. Verify target GPT partition table using sfdisk --json and jq for bluefin-server-root-a and var partitions. Add contract unit tests. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tindex=2 and enforce timeout Enforce INSTALLER_TIMEOUT via timeout utility in test-installer-artifact stage 1. Define target disk using -drive if=none and attach device virtio-blk-pci with bootindex=2 so boot priorities are valid for QEMU. Update contract tests. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e3df491 to
1d72a5e
Compare
…service output to serial console, and add edk2-i386-vars pairing - In bluefin-sysinstall, wait up to 30s using an absolute SECONDS deadline with periodic udevadm trigger and settle for bluefin-installer-data to be enumerated on slower USB controllers before failing. - Mirror systemd-sysinstall.service output to journal+console so installer execution progress and error diagnostics are captured on serial console. - Deduplicate test-installer-boot-usb by having it delegate directly to test-installer-artifact. - Add Homebrew and system edk2-i386-vars.fd to OVMF vars candidates for x86_64 firmware code pairing with fatal fallback. - Strictly scope test-installer-boot-usb unit contract assertions and assert exact dynamic settle timeout. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1d72a5e to
84cedb5
Compare
There was a problem hiding this comment.
Reviewed at head 84cedb5 (the PR advanced past 6b35466 during review).
intent-alignment
The title/body say this adds test-installer-boot-usb to exercise the USB path, but the new recipe is a one-line alias (Justfile:411-412 → just test-installer-artifact). The substantive change is that the existing test-installer-artifact itself was converted from direct -kernel/-initrd/-append boot to OVMF/xHCI USB boot (Justfile:287-303). That silently changes semantics for every existing caller — show-me-the-future (Justfile:220-223) and the CI installer boot test (docs/skills/ci-tooling.md:140) — and removes the only boot-level coverage of the exported PXE kernel/initrd artifacts. If replacing the direct-boot path is intended, say so in the body; otherwise make test-installer-boot-usb a distinct recipe alongside the original.
style
Justfile:237-238 still copies dist/bluefin-server-pxe-vmlinuz-* and dist/bluefin-server-pxe-initrd-* into $WORKDIR/installer.{vmlinuz,initrd}, but nothing uses them after the -kernel/-initrd flags were dropped — dead copies that also keep an unnecessary hard failure (set -e) when PXE artifacts are absent.
docs-currency
docs/skills/ddi-installer-build.md:31-33 catalogs the installer test recipes but was not updated for the new test-installer-boot-usb recipe or the switch of test-installer-artifact to OVMF/USB boot.
Correctness checks passed: the installer UKI bakes in systemd.unit=system-install.target (elements/oci/bluefin-server-installer.bst:405), so dropping -append is safe, and unattended is delivered via the SMBIOS io.systemd.stub.kernel-cmdline-extra string (Justfile:298); the bash SECONDS deadline loop in the preflight is sound.
No findings from: correctness, security.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
There was a problem hiding this comment.
intent-alignment
- The PR is framed as adding
test-installer-boot-usbfor USB testing, but the substance is rewriting the existingtest-installer-artifactto boot via OVMF/xHCI USB (Justfile:286-311), whiletest-installer-boot-usbitself is a one-line alias (just test-installer-artifact, Justfile:412-413). Net effect: the previous direct-kernel-boot (-kernel/-initrd/-append) virtio path is removed, not supplemented — that coverage is silently dropped and the alias adds no distinct coverage. The body doesn't state this replacement; please confirm dropping the direct-kernel path is intended.
correctness
- Justfile:237-238 still copies
dist/bluefin-server-pxe-vmlinuz-*anddist/bluefin-server-pxe-initrd-*.cpio.gzinto$WORKDIR, but nothing uses them after-kernel/-initrdwere removed — dead work underset -euo pipefailthat hard-fails the recipe if PXE artifacts are absent even though they're unneeded. (They are exported byexport-installer, Justfile:123, so this only bites partialdist/states.) - Dropping the
truncatefallback for a missing OVMF_VARS template (Justfile:270-280) hard-fails hosts that ship onlyOVMF_CODE; previously the recipe still ran with a blank vars store. Low, but it's a robustness regression not mentioned in the body. - Verified the mechanism otherwise holds: the installer raw image's UKI cmdline pins
systemd.unit=system-install.target(elements/oci/bluefin-server-installer.bst:405), andunattendednow arrives via the SMBIOSio.systemd.stub.kernel-cmdline-extracredential (Justfile:303) and is read from/proc/cmdline(bst:277-278); the preflight wait loop runs under#!/bin/bashso$SECONDSis valid (bst:184, 197).
docs-currency
- docs/skills/ddi-installer-build.md:32-33 lists the QEMU test recipes; the new
test-installer-boot-usbisn't mentioned, and the describedtest-installer-artifactbehavior changed (OVMF/USB boot instead of direct kernel boot).
No findings from: security, style.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
Three review findings from #228: - test-installer-artifact still copied dist/bluefin-server-pxe-vmlinuz-* and -initrd-*.cpio.gz into $WORKDIR, but the recipe no longer passes -kernel/-initrd, so nothing consumed them. Under set -euo pipefail the copies made the test fail on hosts that have the installer image but no PXE artifacts. export-installer already asserts the PXE pair exists, so that coverage is not lost. - Replacing the truncate-based blank variable store with exit 1 meant hosts shipping only OVMF_CODE could no longer run the test or install-vm. Restore the fallback in both recipes and log a warning, keeping the edk2-i386-vars.fd candidates this PR added. - docs/skills/ddi-installer-build.md did not list test-installer-boot-usb and still implied the old direct-kernel behaviour of test-installer-artifact. Document the OVMF/xHCI USB boot path, the alias, and the OVMF_VARS fallback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Auto-fix: 3 of 4 findings pushed, 1 needs the authorPushed as [correctness/low] Dead PXE artifact copies — fixed. [correctness/low] OVMF_VARS hard fail — fixed. Restored the [docs-currency/low] Recipe list — fixed. [intent-alignment/medium] Direct-kernel-boot coverage removal — not fixed, needs your decision. This one is not agent-fixable, so I have not guessed. The situation:
Three reasonable resolutions, all of which need your intent:
Option 2 is a real behaviour change I should not make on your behalf, and option 1 vs 3 is a naming call, so I am leaving the recipe structure exactly as you wrote it. Note also that the Verification on the pushed commit
🐝 Hive Agent: — hive: agent=ci-maintainer backend=copilot model=claude-opus-5 copilot=1.0.78 |
There was a problem hiding this comment.
intent-alignment
- The body says this adds
test-installer-boot-usbto exercise the USB path, but the diff actually rewritestest-installer-artifactto boot via OVMF/xHCI USB and adds only a one-line alias (Justfile:414-419→just test-installer-artifact). The previous-kernel/-initrddirect-boot coverage is removed, not supplemented — after this PR nothing boots the exported PXE vmlinuz/initrd pair. If losing that coverage is intended, the PR should say so.
correctness
elements/oci/bluefin-server-installer.bst:322-326: the drop-in now setsStandardOutput=journal+console/StandardError=journal+consolefor every install, including interactive bare-metal ones.TTYPath=is only honored forStandard*=tty, so the interactive installer's output moves from/dev/tty0to/dev/console— on machines where the lastconsole=is serial, prompts leave the attached display. That is exactly the behavior the deleted comment ("Keep the interactive installer on the attached display") existed to protect. Consider scoping this to the unattended/test path (e.g. leave stdout on tty and rely onconsole=mirroring, or a credential-injected drop-in).Justfile:319:sfdisk --json ... 2>/dev/null | jq ... || trueswallows tool failures, so a host missingjq(a new, undeclared host dependency of this recipe) reports the misleading "did not receive expected partition layout" instead of the real error.
docs-currency
Justfile:239-240: the new comment claims "just export-installeralready asserts the PXE pair was exported" — it doesn't. The PXE assertions live inexport-pxe(Justfile:132-135);export-installer(Justfile:120-127) just checks out and moves artifacts. The comment documents a guarantee that doesn't exist.
style
tests/unit/test_installer_contract.py:136-137: the removed blank line leavesdef test_interactive_installer_uses_local_virtual_consoleglued to the previous test body (PEP8 E302). Same pattern inJustfile:419where the alias recipe has no separating blank line before theinstall-vmcomment.
No findings from: security.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
…heck Four review findings from #228: - StandardOutput/StandardError=journal+console routes installer output to /dev/console, which follows the last console= argument (ttyS0), so an interactive bare-metal install printed to serial instead of the attached display. TTYPath= is only honoured for Standard*=tty, so it did not counteract this. The wrapper now redirects its own output to /dev/tty0 when 'unattended' is absent from the kernel command line and a local VT is writable, which restores the display for interactive installs while unattended/automated runs keep the serial capture that the drop-in was added for. Headless serial-only interactive installs fall through to journal+console unchanged. - The target-disk partition check piped sfdisk into jq with 2>/dev/null and || true, so a missing or broken tool was reported as "Target disk did not receive expected partition layout". sfdisk and jq are now checked up front and their failures reported separately from a genuinely unpartitioned disk. jq was an undeclared host dependency of this recipe; it is now named in the error path and in docs/skills/ddi-installer-build.md. - The comment added in the previous commit credited export-installer with asserting the PXE pair was exported; those assertions are in export-pxe. - Restore the blank line before test_interactive_installer_uses_local_virtual_console (PEP8 E302) and separate the test-installer-boot-usb recipe from the install-vm comment block. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Auto-fix round 2: 4 of 5 findings pushed, 1 still needs the authorPushed as [correctness/medium] journal+console reroutes interactive output off /dev/tty0 — fixed. Confirmed the regression: the installer UKI cmdline is Rather than reverting the drop-in — which would undo the serial capture CMDLINE="$(< /proc/cmdline)"
if [[ " ${CMDLINE} " != *" unattended "* ]] && [ -w /dev/tty0 ]; then
exec > /dev/tty0 2>&1
fiThree outcomes: interactive with a local VT redirects to the display; interactive without one (headless serial-only install) falls through to journal+console unchanged; unattended keeps journal+console so [correctness/low] Swallowed sfdisk/jq failures and undeclared jq dependency — fixed. [docs-currency/low] Comment credited the wrong recipe — fixed. That was my comment from [style/info] Blank lines — fixed. Restored the blank line before [intent-alignment/medium] "adds" vs replaces — still not fixed, still needs your decision. This is the same finding I raised on the previous round and it is unchanged: Verification on the pushed commit
Note that the installer-image changes are not covered by any test runnable here — they need a real
|
There was a problem hiding this comment.
correctness
- USB path replaces — rather than supplements — the direct-kernel boot test. The diff deletes the
-kernel/-initrd/-appendboot fromtest-installer-artifact(Justfile:238-241, PXEcplines removed) andtest-installer-boot-usb(Justfile:434-439) is only an alias to the same recipe. The PXE vmlinuz/initrd are still exported (elements/oci/bluefin-server-installer.bst:484-488) but now have zero boot-test coverage; the diff comment itself points tojust export-pxe, which only checks the files exist. If both paths matter, the old invocation should survive as a second recipe rather than being overwritten. - Unattended mode is now delivered via
-smbios "type=11,value=io.systemd.stub.kernel-cmdline-extra=..."(Justfile:296). systemd-stub ignores that credential when Secure Boot is enabled, so on a SB-enabled OVMF the installer would boot interactive and sit until the 600s timeout with a nonspecific failure. Worth a comment near the flag since the mechanism is invisible when it no-ops.
intent-alignment
- The PR body describes only the Justfile recipe and unit-test changes, but the diff also changes production installer runtime behavior in
elements/oci/bluefin-server-installer.bst: wrapper output redirection to/dev/tty0for interactive runs (bst:190-197), a new 30s udev retry loop replacing the singlesettle --timeout=15(bst:208-220), andStandardOutput/StandardError=journal+consoleon the service (bst:334-340). These support the USB test but they ship on real installer media, and atest(...)-titled PR body should disclose them. Related: the body says the new recipe "boots the exported raw installer image through OVMF … as USB", but the actual change rewrites the existingtest-installer-artifact, which also altersshow-me-the-future(Justfile:220-223) and the CI installer boot test. - Side effect of the console change: on a serial-only bare-metal box whose kernel still exposes a writable
/dev/tty0, an interactive install now redirects all wrapper output to the (absent) display instead of serial (bst:196-197). The-wguard doesn't distinguish "VT exists" from "someone is watching it".
docs-currency
- docs/skills/ci-tooling.md:140 still says CI "uploads the already-built installer and PXE artifacts" for
just test-installer-artifact; the recipe no longer consumes the PXE pair. One-line staleness, but it's exactly the doc an operator reads to understand this test.
No findings from: security, style.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
…guard test-installer-artifact now takes an INSTALLER_BOOT_MODE of usb (default, firmware boots the raw image off an emulated xHCI USB drive) or pxe (QEMU boots the exported vmlinuz/initrd pair with -kernel/-initrd/-append). Everything after the install is shared. test-installer-boot-usb and test-installer-boot-pxe are the named entry points, so the direct-kernel path the previous revision dropped is exercised again rather than merely existence-checked by export-pxe. Document next to the -smbios flag that systemd-stub ignores io.systemd.stub.kernel-cmdline-extra under Secure Boot, so a secure-boot OVMF build boots interactive and hangs until the install timeout, and point at pxe mode as the way to test unattended installs on such firmware. Restrict the interactive /dev/tty0 redirect to boots where the kernel actually registered tty0 as a console. A writable VT device exists on serial-only bare metal too, so the -w test alone sent the whole interactive install to a display nobody was watching. Correct the ci-tooling sentence that still claimed the uploaded PXE artifacts feed test-installer-artifact. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
correctness
Justfilepxe mode selectsPXE_KERNEL/PXE_INITRDwithfind dist/ ... | head -n1(Justfile:365-366 at head). With multiple exported versions indist/,head -n1(unsorted find output) can pair a vmlinuz from one build with an initrd from another and boot a mismatched pair. The previouscp dist/bluefin-server-pxe-vmlinuz-* ...failed loudly on multiple matches. Considersort+ matching the version stem, or erroring on >1 match.
intent-alignment
- Title says
test(installer)but the PR ships production installer-media changes inelements/oci/bluefin-server-installer.bst:187-230(console redirection, bounded udev wait,StandardOutput=journal+console). The body discloses this and the changes are coupled to the USB boot path, but the conventional-commit type undersells what lands on real media — worth a maintainer's glance. - Body claims "a missing [OVMF_VARS] template is now a warning plus a blank variable store instead of a hard failure" — the blank-store
truncatefallback already exists onmain; the diff only adds the warning line (Justfile:413-416). Behavior claim in the body overstates the change.
No findings from: security, style, docs-currency.
Confidence: 5/5 (safe)
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
|
Shared CI incident, not a defect in this PR: Tracked in #226. Deferring this PR until that incident closes or the baseline turns green — no PR-local repair is warranted.🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-opus-5 copilot=1.0.88 |
…, and OVMF boot test (#243) * test(installer): add test-installer-boot-usb recipe for bare-metal USB OVMF testing Attach installer media via emulated xHCI USB drive in QEMU and boot via OVMF firmware. Verify target GPT partition table using sfdisk --json and jq for bluefin-server-root-a and var partitions. Add contract unit tests. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test(installer): attach target disk as virtio-blk-pci device with bootindex=2 and enforce timeout Enforce INSTALLER_TIMEOUT via timeout utility in test-installer-artifact stage 1. Define target disk using -drive if=none and attach device virtio-blk-pci with bootindex=2 so boot priorities are valid for QEMU. Update contract tests. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): add 30s bounded wait for installer partition, mirror service output to serial console, and add edk2-i386-vars pairing - In bluefin-sysinstall, wait up to 30s using an absolute SECONDS deadline with periodic udevadm trigger and settle for bluefin-installer-data to be enumerated on slower USB controllers before failing. - Mirror systemd-sysinstall.service output to journal+console so installer execution progress and error diagnostics are captured on serial console. - Deduplicate test-installer-boot-usb by having it delegate directly to test-installer-artifact. - Add Homebrew and system edk2-i386-vars.fd to OVMF vars candidates for x86_64 firmware code pairing with fatal fallback. - Strictly scope test-installer-boot-usb unit contract assertions and assert exact dynamic settle timeout. Assisted-by: github-copilot/gemini-3.8-flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): drop dead PXE copies, restore OVMF_VARS fallback Three review findings from #228: - test-installer-artifact still copied dist/bluefin-server-pxe-vmlinuz-* and -initrd-*.cpio.gz into $WORKDIR, but the recipe no longer passes -kernel/-initrd, so nothing consumed them. Under set -euo pipefail the copies made the test fail on hosts that have the installer image but no PXE artifacts. export-installer already asserts the PXE pair exists, so that coverage is not lost. - Replacing the truncate-based blank variable store with exit 1 meant hosts shipping only OVMF_CODE could no longer run the test or install-vm. Restore the fallback in both recipes and log a warning, keeping the edk2-i386-vars.fd candidates this PR added. - docs/skills/ddi-installer-build.md did not list test-installer-boot-usb and still implied the old direct-kernel behaviour of test-installer-artifact. Document the OVMF/xHCI USB boot path, the alias, and the OVMF_VARS fallback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): keep interactive installs on tty0, harden partition check Four review findings from #228: - StandardOutput/StandardError=journal+console routes installer output to /dev/console, which follows the last console= argument (ttyS0), so an interactive bare-metal install printed to serial instead of the attached display. TTYPath= is only honoured for Standard*=tty, so it did not counteract this. The wrapper now redirects its own output to /dev/tty0 when 'unattended' is absent from the kernel command line and a local VT is writable, which restores the display for interactive installs while unattended/automated runs keep the serial capture that the drop-in was added for. Headless serial-only interactive installs fall through to journal+console unchanged. - The target-disk partition check piped sfdisk into jq with 2>/dev/null and || true, so a missing or broken tool was reported as "Target disk did not receive expected partition layout". sfdisk and jq are now checked up front and their failures reported separately from a genuinely unpartitioned disk. jq was an undeclared host dependency of this recipe; it is now named in the error path and in docs/skills/ddi-installer-build.md. - The comment added in the previous commit credited export-installer with asserting the PXE pair was exported; those assertions are in export-pxe. - Restore the blank line before test_interactive_installer_uses_local_virtual_console (PEP8 E302) and separate the test-installer-boot-usb recipe from the install-vm comment block. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test(installer): keep the PXE boot path under test, tighten the tty0 guard test-installer-artifact now takes an INSTALLER_BOOT_MODE of usb (default, firmware boots the raw image off an emulated xHCI USB drive) or pxe (QEMU boots the exported vmlinuz/initrd pair with -kernel/-initrd/-append). Everything after the install is shared. test-installer-boot-usb and test-installer-boot-pxe are the named entry points, so the direct-kernel path the previous revision dropped is exercised again rather than merely existence-checked by export-pxe. Document next to the -smbios flag that systemd-stub ignores io.systemd.stub.kernel-cmdline-extra under Secure Boot, so a secure-boot OVMF build boots interactive and hangs until the install timeout, and point at pxe mode as the way to test unattended installs on such firmware. Restrict the interactive /dev/tty0 redirect to boots where the kernel actually registered tty0 as a console. A writable VT device exists on serial-only bare metal too, so the -w test alone sent the whole interactive install to a display nobody was watching. Correct the ci-tooling sentence that still claimed the uploaded PXE artifacts feed test-installer-artifact. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: generate console JWT secret at first boot, not in git The kubestellar-console-github-oauth Secret committed a usable jwt-secret (default-jwt-secret-123456789012345678901234). JWT_SECRET signs console session tokens, so a value published in git lets anyone forge valid sessions on every default install. Mirror the kubeflex-postgres pattern (#98): the committed 01- manifest now creates only the namespace, and a first-boot generator writes 02-kubestellar-console-secret.yaml with a random 256-bit jwt-secret and empty OAuth credentials (consumed with optional: true). Idempotent, 0600, runs from k0s-first-boot.service before k0scontroller starts. Existing installs rotate on upgrade: tmpfiles C+ replaces the stale 01- copy (dropping the published Secret) and the generator creates the 02- file fresh, invalidating any tokens forged with the public value. Closes #72 Assisted-by: Claude Fable 5 via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> * fix(boot): rename systemd presets to sort before Flatcar's 99-default 'disable *' Flatcar's /usr ships /usr/lib/systemd/system-preset/99-default.preset containing 'disable *'. systemd reads preset files in lexicographic filename order and the first matching line wins, so every Bluefin preset named zz-enable-*.preset sorted after it and was ignored at first-boot preset-all. k0s-first-boot.service was therefore never enabled: the QEMU smoke test sat at 'kiosk-ready: waiting k0s=inactive' for the full 900s window on every run since the Flatcar payload switch. Rename the presets to 20-bluefin-*.preset so they sort before 99-default.preset, and add a unit test asserting no staged preset can regress behind the Flatcar catch-all again. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> * test: update preset paths to 20-bluefin-*, add sort-order guard, log pod states in smoke probe - Update the two unit tests that still referenced the removed zz-enable-*.preset filenames (the rename commit shipped without them). - Add test_presets_sort_before_flatcar_disable_all so no future preset can sort behind Flatcar's 99-default.preset 'disable *' catch-all. - Teach the installer smoke readiness unit to print the pod table and the last Warning events alongside the existing counters, so a run that reaches k0s=active but never gets a pod to Running names the blocker in the serial log instead of only counting it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check <sec-check@hive.kubestellar.io> * fix(security): force rotation of seeded root password at first login The DDI seeds a well-known root password ('bluefin', hash public in this repo) into every shipped image with shadow last-change 19700, so the credential never expires and is identical fleet-wide. PR #169 already restored the sshd drop-in hardening (PermitRootLogin prohibit-password, PasswordAuthentication no), which closes the remote root path; the remaining gap from #168 is that console bring-up never forces rotation. Set the shadow last-change field to 0 (the `chage -d 0 root` equivalent): every login as root — console included — is forced onto a per-install password before any shell is granted. Update the console banner to disclose the forced change, and add a unit contract locking in both the rotation and the SSH no-password-auth policy as a regression guard. The long-term removal of the baked password (core operator account, systemd-credentials key provisioning) is tracked by #80; this is the minimal interim hardening requested by the issue. Fixes: #168 Hive-Run: #168 Hive-Plan: Security remediation — interim hardening of seeded root credential (issue #168, recommendation item 2) Hive-Spec: docs/superpowers/specs/2026-09-09-core-login-design.md#interim-shadow-expiry Assisted-by: GLM (z-ai/glm-5.3-flash) via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mendezr <mendezr@users.noreply.github.com> * test(installer): surface node, pull, and k0s runtime errors in the kiosk waiter The preset rename in this PR gets k0scontroller active, but the smoke gate still times out: every pod sits Pending/ContainerCreating for the full 900s window (kube-proxy ContainerCreating, kube-router Init:0/2, node tainted not-ready). The current 30s debug line only shows Warning events, and the FailedScheduling flood from ten Pending pods pushes the informative events (image pulls, sandbox creation, CNI) out of the tail -n 5 window. Extend the in-guest waiter's periodic dump so the serial log carries enough to diagnose the next layer: - node status line (kiosk-node) — shows Ready/NotReady and the CRI version - all event kinds minus the FailedScheduling flood (kiosk-events) - error/fail/taint lines from the k0scontroller journal (kiosk-k0s), where the embedded kubelet and containerd log Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check <sec-check@hive.kubestellar.io> * fix(boot): seed /etc/resolv.conf symlink via tmpfiles.d so kubelet can create pod sandboxes The preset rename got k0s and kubelet running, but every pod sandbox then failed with 'open /etc/resolv.conf: no such file or directory' and the console readiness gate timed out (run 36014129412). Flatcar ships the /etc/resolv.conf symlink inside the image /etc and strips /etc-populating lines from /usr/lib/tmpfiles.d at image build; this DDI imports only Flatcar's /usr and first-boots with an empty /etc, so the symlink never exists. Recreate Flatcar's stock symlink (/etc/resolv.conf -> ../run/systemd/resolve/resolv.conf, the full resolver list, matching Flatcar >= 3510.3.0) with a tmpfiles.d rule installed from a new os-resolv-conf.bst element, and guard it with a unit test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check <sec-check@hive.kubestellar.io> * fix(installer): bare-metal rootfs stability, OEM unit cleanup, and preflight hardening - Set GrowFileSystem=no on bluefin-server-root-a in 20-root-a.conf to prevent interrupted first-boot metadata corruption on the immutable root partition. - Disable experimental features (reflink, rmapbt, parent, exchange) and widen headroom in elements/oci/bluefin-server-ddi.bst mkfs.xfs to prevent ENOSPC metadata reservation failure during log replay. - Remove Flatcar oem.mount, dev-disk-by-label-OEM.device, and fsck drop-ins in elements/flatcar/flatcar-usr.bst to prevent 90s device timeout on first boot. - Default INSTALLER_PART="" before preflight in elements/oci/bluefin-server-installer.bst so PXE boots under `set -u` do not fail on unbound variable. - Update contract tests in test_flatcar_usr.py and test_repart_layout.py. Assisted-by: claude-3-5-sonnet via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): auto-pass target disk when singular and clarify numbered selection - When exactly one non-installer target disk is present, pass it directly to systemd-sysinstall so the user is not prompted for the device path. - When multiple target disks are present, print a hint that systemd-sysinstall's native interactive prompt accepts single-digit menu numbers (1, 2, ...). Assisted-by: claude-3-5-sonnet via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(installer): replace hardlinked CA tree before DDI copy Avoid copying BuildBarn CAS-hardlinked certificate files onto themselves when composing the OS DDI. Align installer documentation with the existing no-grow root recipe. Assisted-by: github-copilot/gpt-6-sol via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> Signed-off-by: sec-check <sec-check@hive.kubestellar.io> Signed-off-by: mendezr <mendezr@users.noreply.github.com> Co-authored-by: Jorge Castro <castrojo@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: ci-maintainer <ci-maintainer@users.noreply.github.com> Co-authored-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com> Co-authored-by: sec-check <sec-check@hive.kubestellar.io> Co-authored-by: mendezr <mendezr@users.noreply.github.com>
Summary
Test recipes (
Justfile)just test-installer-artifactis rewritten rather than duplicated: it now takes anINSTALLER_BOOT_MODEofusb(default) orpxe, and everything after the install —target partition check, booting the installed system, kiosk readiness probe — is shared.
usb: firmware (OVMF) boots the exported raw installer image off an emulated xHCIUSB drive (
-device qemu-xhci,-device usb-storage,bus=xhci.0,drive=installer-disk,bootindex=1),with the target disk on virtio-blk (
-device virtio-blk-pci,drive=target-disk,bootindex=2).This is the bare-metal USB install path. Unattended mode rides on
-smbios type=11 io.systemd.stub.kernel-cmdline-extra; systemd-stub ignores thatcredential under Secure Boot, which is called out in a comment at the flag.
pxe: the previous-kernel/-initrd/-appenddirect-kernel boot of the exportedPXE pair, preserved so
just export-pxe's existence check is not the only PXE coverage.just test-installer-boot-usb/just test-installer-boot-pxeare the named entry points.timeout ${SHOW_ME_THE_FUTURE_INSTALL_TIMEOUT:-600}, and thetarget disk is asserted to carry both
bluefin-server-root-aandvarpartition labels viasfdisk --jsonandjq, with host-tool failures reported distinctly from install failures.edk2-i386-vars.fdadded to theOVMF_VARScandidate list; a missing template is now awarning plus a blank variable store instead of a hard failure.
show-me-the-futureand the CI installer boot test run theusbmode of this recipe,i.e. their boot method changes from direct-kernel to firmware/USB.
Installer media changes (
elements/oci/bluefin-server-installer.bst) — ships on real mediaThese are production installer changes, not test-only:
StandardOutput=journal+consoleandStandardError=journal+consoleon the installer service, so progress and diagnosticsreach the serial console in headless and automated runs.
/dev/tty0. Becausejournal+consolefollows the lastconsole=argument (ttyS0), the wrapper redirects its own output back to the attacheddisplay for interactive installs — only when
unattendedis absent from the kernel commandline,
/dev/tty0is writable, and the kernel registered tty0 as a console(
/sys/class/tty/console/active), so serial-only machines keep their output on serial.udevadm settle --timeout=15: trigger, settle in ≤5s slices, and retry until/dev/disk/by-partlabel/bluefin-installer-dataappears or the deadline passes. The failurepath still dumps
lsblkand the by-partlabel symlinks. USB enumeration is slower thanvirtio, so the old fixed settle was flaky on the USB boot path.
Tests and docs
tests/unit/test_installer_contract.pyfor both boot modes, thepartition check, the tty0 guard, the bounded udev wait, and the console output settings.
docs/skills/ddi-installer-build.mddocuments the boot modes;docs/skills/ci-tooling.mdno longer claims the uploaded PXE artifacts feed
just test-installer-artifact.Verification
pytest tests/unit -q: 297 passed, 1 xfailedpython3 .github/scripts/docs-checks.py: passedjust --listparses; the recipe body and the installer wrapper passbash -n— hive: backend=omp model=github-copilot/gemini-3.8-flash