staging: add mission-control - execute the ISO permutation matrix - #317
Open
dcasota wants to merge 2 commits into
Open
staging: add mission-control - execute the ISO permutation matrix#317dcasota wants to merge 2 commits into
dcasota wants to merge 2 commits into
Conversation
ISO-PERMUTATION-MATRIX.md states of itself "No builds were run." Fourteen of
its sixteen rows are dependency-resolution predictions or code reading; only
two were ever installed. This is the execution layer it lacks: build the ISOs,
stage the VMs, drive the installs, verify against an oracle that names the PR
behind every failure.
Reuses the mechanics of vm-lab - VMX discipline, thin disks, stash-never-delete
teardown, the serial-log liveness instrument - and drops everything specific to
the SPAGAT-Librarian appliance, which is out of scope.
What makes it tractable: POI's isoInstaller reads guestinfo.kickstart.data via
vmtoolsd, and /usr/bin/vmtoolsd is in the installer initrd (open-vm-tools is in
packages_installer_initrd.json). A per-permutation kickstart is therefore one
line in the VMX - no ISO remaster, no HTTP server, no boot-menu typing. That
separates the build-time axes (ISO type, installer version -> 4 cached ISOs)
from the install-time axes (STIG, filesystem, kickstart vs UI -> free), so 34
permutations need only 4 builds.
Both install paths are driven, because each has a failure mode the other
cannot reach: the STIG menu is UI-only, so a kickstart must list
KS_STIG_PACKAGES by hand; the security: key failure is kickstart-only on POI
2.8, and security: {fips} is reachable exclusively from a kickstart on either
version. The same underlying failure also surfaces differently on the two
paths, so one oracle calibrated on one path would misread the other.
Every assertion names the PR it proves, so a failing row reports "POI#11"
rather than "something broke". Currently covers PR#9, PR#21, PR#22, PR#24,
POI#9, POI#10 and POI#11.
Verified on this host rather than assumed:
- vmrun and vmware-vdiskmanager execute from WSL; preflight passes
- a real VM was created end to end: 4.1 MB thin disk for a 32 GB volume,
unique MAC/UUID, correct Windows paths, kickstart injected as guestinfo
- the interactive variant emits no active guestinfo line at all, which is
what selects the curses configurator
- teardown stashed the chain and preserved the VMX and serial logs
- generated kickstarts validate against POI's own known_keys for all four
variants, so none can abort the install on an unknown key
- the oracle ran against a live Photon guest and reported correctly
Four portability traps found and handled while building it:
- /usr/bin/grep is toybox in a non-interactive shell and has NO -a: it
returns zero matches on a NUL-bearing serial log instead of erroring.
Interactively grep is ugrep, which supports -a and -P. mc_grep_count
strips NULs first rather than trusting either.
- grep -P and sed \U are GNU extensions, absent here for the same reason.
- vmrun output is CRLF; every parse strips \r.
- a cksum-based permutation index collided on this very matrix (k04/k16 and
k09/s02 shared a MAC, UUID and IP) and could reach .240, inside VMnet8's
DHCP range. The index is now the ordinal in permutations.tsv.
Signed-off-by: Daniel Casota <dcasota@gmail.com>
Two corrections after first contact with the real host. The poi=latest rows do not need anything merged. Requiring dcasota/photon#26 to land before its own rows could run inverted the point of the harness: you would be merging untested code to be able to test it. Each installer variant now gets its own patch, assembled by cherry-picking the PR branches onto a pristine 5.0 in a throwaway clone: poi-2.8.patch 5.0 + #9 #19 #21 #22 #23 #24 27 files poi-latest.patch 5.0 + #9 #21 #22 #23 #24 #26 26 files #19 and #26 are alternatives - #19 adds patches to 2.8, #26 moves to v2.9 where three of them are already upstream - so exactly one is in each. Both are verified to apply to a pristine 5.0 before use. The variant is selected by staging a script directory, not by editing the build script: runPh5_normal.sh resolves its patch relative to its own location and uses SCRIPT_DIR for nothing else (:75, :163). The UI rows now hand the operator a generated instruction card. mc-operator-card.sh prints exactly what to enter - partition sizes and filesystem, hostname, root password, and the STIG answer - built from permutations.tsv so it cannot drift from the matrix it exercises. mc-install.sh --no-wait starts the VM and returns instead of polling, so the caller can surface the card and verify when the human is done. Also fixed: a path bug that cost two failed builds. runPh5_normal.sh resolves downstream-fixes.patch relative to ITSELF, and this host has two copies of both. The scripts-repo copy carried a stale 8-file patch that no longer applies while /root carried the live 27-file one, so the build died with "does not apply" on linux.spec:77 - which reads like a rebase problem rather than a path problem. PHOTON_SCRIPTS now points at the live pair, and mc-preflight.sh asserts that the patch the build will resolve is the same file preflight validated. Signed-off-by: Daniel Casota <dcasota@gmail.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.
ISO-PERMUTATION-MATRIX.mdsays of itself: "No builds were run." Fourteen of its sixteen rows are dependency-resolution predictions or code reading; only two were ever installed. This is the execution layer it lacks.It reuses
vm-lab's mechanics — VMX discipline, thin disks, stash-never-delete teardown, the serial-log liveness instrument — and drops everything specific to the SPAGAT-Librarian appliance, which is out of scope. In particular it does not needspagat-vm-orchestrator, which is a cargo artifact of a repo this project does not have;vmrunplus VMX edits cover everything it did except install-completion detection, which is done here by watching the boot source change in the serial log.What makes 34 permutations cost 4 builds
POI's
isoInstallerdoes not only readks=from the kernel cmdline —_load_ks_config_vmware()readsguestinfo.kickstart.datathroughvmtoolsd. I verified the mechanism is actually present, not merely coded for:So a per-permutation kickstart is one line in the VMX. No ISO remaster, no HTTP server, no typing at a boot menu. That separates the axes cleanly:
Why both install paths are driven
Not thoroughness — each has a failure mode the other cannot reach.
stigenable.pyis reached solely from the curses configurator), so a kickstart can never answer it and must listKS_STIG_PACKAGESby hand.security:key failure is kickstart-only on POI 2.8, andsecurity: {fips: …}is reachable exclusively from a kickstart on either version. Rowss01/s02cover it.InstallerError("Installer failed")on screen with the cause only in/var/log/installer. An oracle calibrated on one path misreads the other.How a PR regression is identified
Every assertion names the PR it proves, so the report names the culprit rather than saying something broke:
DOCis the verdict the matrix recorded before the PRs. A row reproducingDOC'sfailsis the regression signal. Covers PR#9, PR#21, PR#22, PR#24, POI#9, POI#10, POI#11.Results land in
$MC_RESULTS_DIR/<perm>/:checks.jsonl(one JSON object per assertion), the generatedkickstart.json, andlogs/with dmesg,journalctl -b,journalctl -p err, failed units,rpm -qa,/proc/cmdline, mounts,/var/log/{installer,ansible-stig,messages}, the mkinitrd log and the POI manifest. The matrix supplies a resolution oracle only — it gives no dmesg/journalctl//var/logcriteria at all, so that layer is new.Verified on this host, not assumed
vmrunandvmware-vdiskmanagerexecute from WSL;mc-preflight.shpassesguestinfoguestinfoline at all — which is what selects the curses configuratorknown_keysfor all four variants, so none can abort the install on an unknown keyFour portability traps found while building it
grep -adoes not work here. In a non-interactive shell/usr/bin/grepis toybox, which has no-aand returns zero matches on a NUL-bearing serial log instead of erroring — the same silent-zero trapvm-lab's README documents, reached by a different route. Interactivelygrepisugrep, which supports both-aand-P, so anything verified at a prompt can still be wrong inside a script.mc_grep_countstrips NULs first and trusts neither.grep -Pandsed \Uare GNU extensions and absent for the same reason;mc_win_pathusestr.vmrunoutput is CRLF — every parse strips\r. My own preflight reported "0 VMs running" againstvmrun's "Total running VMs: 2" until I did.A hashed permutation index collides. A
cksum-based index collided on this very matrix —k04/k16andk09/s02would have shared a MAC, a UUID and an IP — and could reach.240, inside VMnet8's DHCP range of.128–.254. The index is now the ordinal inpermutations.tsv: unique by construction, addresses confined to.41–.74.Operational notes
Runs are sequential: every ISO build shares
$PHOTON_TREE/stage, and C: has ~138 GB free, so VMs are torn down after verification rather than kept. Nothing ever blanket-stops VMs — this host runs other VMs including live CI runners, so every operation targetsmc-<perm>by name. VMs live atC:\photon-mc\vm, deliberately not under OneDrive: the hand-made test VM lived underOneDrive\Dokumente\Virtual Machinesand vanished mid-session.Two ISOs the matrix needs (
minimal/latest,full/latest) cannot be built until the installer version bump lands —mc-build-iso.shrefuses with a clear message rather than silently building the wrong thing.