Skip to content

boot: STARTUP.EXE reads OVMXVMSSYS.PAR, sets real hostname from SCSNODE (vms-b6a7) - #282

Merged
baron-3dl merged 2 commits into
mainfrom
vms-b6a7-scsnode-hostname-boot
Aug 10, 2026
Merged

baron-3dl merged 2 commits into
mainfrom
vms-b6a7-scsnode-hostname-boot

Conversation

@baron-3dl

Copy link
Copy Markdown
Contributor

Summary

  • STARTUP.EXE's SYSBOOT role (src/ovmx_init/ovmx_init.c) now reads SYS$SYSTEM:OVMXVMSSYS.PAR after the system disk is mounted and confirmed installed, and calls sethostname() from the SCSNODE parameter. The hardcoded sethostname("OVMX", 4) is gone.
  • Shares the existing reader (sysgen_read_string()/sysgen_read_param() in src/libvms/include/sysgen_params.h) — the same header vms_sysgen.c, scsd.c, and the DCL F$GETSYI lexicals already use. No second parser (vms-9b7 defect class). PID 1 needs no new link dependency: it already links vmsfs/vmsfs_static.
  • Missing/corrupt OVMXVMSSYS.PAR on an already-installed disk is not the mount-or-halt condition: it boots on the compiled-in default node name with an honest, explicitly %OVMX--facility warning (Rule 10 — no invented VMS message, since no oracle capture of this condition exists).
  • New QEMU e2e gate tests/qemu/test_boot_scsnode_hostname_e2e.sh (+ ctest entry + CI job boot-scsnode-hostname-e2e), proving against a real boot/reboot: SYSGEN SET SCSNODE + WRITE CURRENT survives a reboot into the real Linux hostname (via F$GETSYI("NODENAME"), not SCSNODE/SHOW SYSTEM which already read the .PAR directly and would pass unchanged); and the missing-.PAR negative control.

Harness hang (found and fixed during verification)

A local proof run stalled for 1h43m. Root cause, isolated by direct reproduction: launching QEMU through a helper function called via command substitution (QP=$(boot_qemu ...)) reliably wedged the backgrounded QEMU launch — ps inside the container showed only the stuck subshell, no timeout/qemu child at all, versus an inlined equivalent that boots to Username: in ~9s every time. Fixed by inlining every QEMU invocation directly, matching the already-proven pattern in test_release_e2e.sh / test_sysgen_versioning_e2e.sh — no boot_qemu() helper. Also hardened: timeout -k 15 (SIGKILL escalation if QEMU ignores SIGTERM) on every invocation, plus an outer timeout --kill-after=30 <budget> + named-container cleanup trap in run_boot_scsnode_hostname_e2e.sh so no combination of internal blocking calls can hang past a fixed ceiling.

Along the way, found and fixed two test-assertion bugs (not product bugs): check()'s grep -qF lacked --, so patterns starting with - (VMS's real continuation-line convention, e.g. -OVMX-I-NOPARAMS, ...) were silently parsed as grep options and never matched; and a DIRECTORY-finds-nothing assertion expected an invented %DIRECT- error line where the real, correct output for an exact filespec with zero matches is Total of 0 files, 0 blocks..

Test plan

🤖 Generated with Claude Code

alice and others added 2 commits August 10, 2026 16:19
…ion bugs, CASE1 fully green

Root cause of the 1h43m hang: QP=$(boot_qemu ...) launched qemu via a
helper function invoked through command substitution. That construct
reliably wedged the backgrounded qemu launch (reproduced: ps inside the
container showed only the stuck subshell, no timeout/qemu child at all,
vs an inlined equivalent that boots to Username: in ~9s every time).
Fixed by inlining every qemu invocation directly, matching the already-
proven pattern in test_release_e2e.sh / test_sysgen_versioning_e2e.sh.
No boot_qemu() helper.

Also hardened: timeout -k 15 (SIGKILL escalation if QEMU ignores SIGTERM)
on every qemu invocation, and an outer timeout --kill-after=30 <budget>
+ named-container cleanup trap in run_boot_scsnode_hostname_e2e.sh so no
combination of internal blocking calls can hang past a fixed ceiling.

ovmx_init.c's SCSNODE read is confirmed NOT the hang: manual bounded
boots (both the standalone and full-harness invocation) show the boot
completing to Username: in seconds with %OVMX-I-SCSNODE printed exactly
where expected.

Bounded proof run (BOOT_TIMEOUT=90 SETTLE_SECS=45): 19/21 checks green.
CASE 1 (positive, SCSNODE survives reboot) fully green. CASE 2 (negative)
had 2 test-assertion bugs, now fixed: (a) check()'s grep -qF lacked --,
so patterns starting with "-" (VMS's real continuation-line convention,
e.g. "-OVMX-I-NOPARAMS, ...") were silently parsed as grep options and
never matched even though the log demonstrably contained them; (b) the
DIRECTORY-finds-nothing assertion expected an invented "%DIRECT-" error
line -- the real, correct behavior for an exact (non-wildcard) filespec
with zero matches is "Total of 0 files, 0 blocks.", no error facility
line at all.

Re-running the bounded proof next to confirm full green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@baron-3dl
baron-3dl merged commit 42c8ca8 into main Aug 10, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant