boot: STARTUP.EXE reads OVMXVMSSYS.PAR, sets real hostname from SCSNODE (vms-b6a7) - #282
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/ovmx_init/ovmx_init.c) now readsSYS$SYSTEM:OVMXVMSSYS.PARafter the system disk is mounted and confirmed installed, and callssethostname()from theSCSNODEparameter. The hardcodedsethostname("OVMX", 4)is gone.sysgen_read_string()/sysgen_read_param()insrc/libvms/include/sysgen_params.h) — the same headervms_sysgen.c,scsd.c, and the DCLF$GETSYIlexicals already use. No second parser (vms-9b7 defect class). PID 1 needs no new link dependency: it already linksvmsfs/vmsfs_static.OVMXVMSSYS.PARon 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).tests/qemu/test_boot_scsnode_hostname_e2e.sh(+ ctest entry + CI jobboot-scsnode-hostname-e2e), proving against a real boot/reboot: SYSGENSET SCSNODE+WRITE CURRENTsurvives a reboot into the real Linux hostname (viaF$GETSYI("NODENAME"), notSCSNODE/SHOW SYSTEMwhich already read the.PARdirectly and would pass unchanged); and the missing-.PARnegative 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 —psinside the container showed only the stuck subshell, notimeout/qemuchild at all, versus an inlined equivalent that boots toUsername:in ~9s every time. Fixed by inlining every QEMU invocation directly, matching the already-proven pattern intest_release_e2e.sh/test_sysgen_versioning_e2e.sh— noboot_qemu()helper. Also hardened:timeout -k 15(SIGKILL escalation if QEMU ignores SIGTERM) on every invocation, plus an outertimeout --kill-after=30 <budget>+ named-container cleanup trap inrun_boot_scsnode_hostname_e2e.shso 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()'sgrep -qFlacked--, 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 aDIRECTORY-finds-nothing assertion expected an invented%DIRECT-error line where the real, correct output for an exact filespec with zero matches isTotal of 0 files, 0 blocks..Test plan
ctest -LE slow: 123/124 passing pre-change; the one failure (env_identity_census_negctl, a slow whole-tree-copy mutation test, unrelated to this change) reproduced identically on the unmodified tree — confirmed pre-existing, not introduced here.main(dcl: MOUNT/DISMOUNT really mount(2)/umount(2) vmsfs volumes (vms-651) #277 MOUNT, PRODUCT INSTALL: land a real kit on a real vmsfs volume (vms-df9) #278 PRODUCT INSTALL, release: cut-release.sh — reproducible release bundle from a clean tree (vms-d73) #279 cut-release, release: install->UPGRADE->boot e2e gate proves the upgrade-safety gap (vms-f05) #280 upgrade-gate).tests/qemu/test_boot_scsnode_hostname_e2e.shagainst the real mastered image: 21/21 checks green (positive: SCSNODE survives reboot into the real hostname; negative: missing.PARboots honestly on defaults).tests/qemu/test_persistent_boot.sh(mount-or-halt gate) against the same image: 20/20 checks green — confirms the identity change does not regress the mount-or-halt boot gate.boot-scsnode-hostname-e2ejob.🤖 Generated with Claude Code