Repository navigation
[PRODENG-3924] Diagnose the Windows AllSigned install refusal - #708
james-nesbitt wants to merge 1 commit into
Conversation
main cannot install MCR on Windows. Run 43206166973 failed on all three hosts -- Server 2019, 2022 and 2025 -- about two seconds after "running installer": File C:\Users\Administrator\installerWindows40269044.ps1 cannot be loaded. The contents of file ... That is PowerShell refusing the script under -ExecutionPolicy AllSigned, which #699 introduced in place of Bypass. It affects every customer on the default installURLWindows, not just CI. The message is cut off exactly where the reason would be, and the two candidate reasons need opposite fixes: "...might have been changed by an unauthorized party" the file was altered between download and execution "...might not be trusted" the signature is fine but the publisher is not in the host's TrustedPublisher store, and a prompt under -NonInteractive is a hard failure Neither is recoverable from the truncated form, so this adds the diagnostics first. On an install failure the error now carries the installer's own output, Get-AuthenticodeSignature's status, message and signer, and Get-ExecutionPolicy -List. It is the Windows counterpart of the journalctl capture EnableMCR does on Linux, added in #699 for the same reason: the only description of what went wrong was discarded. Ruled out already, measured rather than assumed: the download-and-cache step preserves the file exactly. Replicating downloadInstaller against get.mirantis.com/install.ps1 reproduces the published sha256 at all 71,351 bytes, so if the bytes change it happens in remotefs.Upload, not before it. Also exposes spec.mcr.installURLWindowsAllowUnsigned through the aws-simple example, defaulting false as launchpad does, and sets it true for the smoke suites. Without that every Windows suite dies at Install MCR before reaching any launchpad behaviour, which makes smoke-windows useless as a signal on unrelated work -- #695 was failed by this, having changed nothing on the path. This does not decide what AllSigned should ultimately do. It makes the next Windows run say which fix is needed, and restores smoke-windows as a signal meanwhile. Verified: go build, go vet, make lint 0 issues, make unit-test 0 failures, terraform fmt clean. Written by AI: claude-opus-5 Signed-off-by: James Nesbitt <jnesbitt@mirantis.com>
|
Superseded by #709, which reverts #699 wholesale rather than making the enforcement conditional. Reason: even a correctly signed script is refused on a stock host. The corrected artifact from docker-install-ee PR#210 reports So the opt-out this PR added, and the field it used, both go away with the revert. What remains worth keeping here is I'll rebase that onto the revert if it's wanted; otherwise close. Written by AI: claude-opus-5 |
|
not the right approach. |
What
maincannot install MCR on Windows. This makes the next Windows run say why, and restoressmoke-windowsas a usable signal meanwhile.It does not decide what
AllSignedshould ultimately do — that needs the measurement this PR produces.The breakage
Run 43206166973 failed on all three hosts — Server 2019, 2022 and 2025 — about two seconds after
running installer:That is PowerShell refusing the script under
-ExecutionPolicy AllSigned, which #699 introduced in place ofBypass. It affects every customer using the defaultinstallURLWindows, not just CI.Why the message is useless, and the fix for that
rig truncates a command's output into its error at roughly a hundred characters, so the reason is cut off exactly where it starts. The two candidates need opposite fixes:
TrustedPublisherstore — and a prompt under-NonInteractiveis a hard failureAllSignedcannot work on a stock host at allNeither is recoverable from the truncated form. An install failure now carries:
Get-AuthenticodeSignature'sStatus,StatusMessageand signerGet-ExecutionPolicy -ListThis is the Windows counterpart of the
journalctlcaptureEnableMCRdoes on Linux — added in #699 for exactly this reason, where the EL10 diagnosis was impossible until systemd's stderr was attached. The Windows path had the same blind spot.Already ruled out, by measurement
The download-and-cache step preserves the file exactly. Replicating
downloadInstalleragainstget.mirantis.com/install.ps1reproduces the published SHA-256 at all 71,351 bytes. So if the bytes change, it happens inremotefs.Upload, not before it.An EC2 probe was attempted first and produced nothing usable: EC2Launch v2 does not stream user-data output to the console log, unlike v1, and SSM is unavailable on the account. The instance was destroyed. Hence diagnosing through the product's own error path instead, which is where the information was being dropped anyway.
The opt-out, and why smoke sets it
spec.mcr.installURLWindowsAllowUnsignedis now reachable from the aws-simple example aslaunchpad.mcr_install_url_windows_allow_unsigned, defaulting tofalseexactly as launchpad does.The smoke suites set it
true. Without that, every Windows suite dies at Install MCR before reaching any launchpad behaviour, which makessmoke-windowsworthless as a signal on unrelated work — #695 was failed by this despite changing nothing on the path.This is deliberately a test-side opt-out, not a change to the product default. If the diagnosis shows
AllSignedis unworkable, the default is the next decision and belongs in its own change.Testing
smoke-windowsis labelled on this PR. Expected outcome: the suite passes, because the opt-out restores the pre-#699 behaviour — which is itself the confirmation thatAllSignedis the sole cause. If it fails, the new diagnostics will say why in full, and that is the more valuable result.Checklist
Written by AI: claude-opus-5