Skip to content

[PRODENG-3924] Diagnose the Windows AllSigned install refusal - #708

Closed
james-nesbitt wants to merge 1 commit into
mainfrom
PRODENG-3924-windows-allsigned
Closed

james-nesbitt wants to merge 1 commit into
mainfrom
PRODENG-3924-windows-allsigned

Conversation

@james-nesbitt

Copy link
Copy Markdown
Collaborator

What

main cannot install MCR on Windows. This makes the next Windows run say why, and restores smoke-windows as a usable signal meanwhile.

It does not decide what AllSigned should 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:

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 using the default installURLWindows, 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:

Full message Meaning Fix
"…might have been changed by an unauthorized party" the file was altered between download and execution fix the upload path
"…might not be trusted" signature valid, publisher not in the host's TrustedPublisher store — and a prompt under -NonInteractive is a hard failure AllSigned cannot work on a stock host at all

Neither is recoverable from the truncated form. An install failure now carries:

  • the installer's own output
  • Get-AuthenticodeSignature's Status, StatusMessage and signer
  • Get-ExecutionPolicy -List

This is the Windows counterpart of the journalctl capture EnableMCR does 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 downloadInstaller against get.mirantis.com/install.ps1 reproduces the published SHA-256 at all 71,351 bytes. So if the bytes change, it happens in remotefs.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.installURLWindowsAllowUnsigned is now reachable from the aws-simple example as launchpad.mcr_install_url_windows_allow_unsigned, defaulting to false exactly as launchpad does.

The smoke suites set it true. Without that, every Windows suite dies at Install MCR before reaching any launchpad behaviour, which makes smoke-windows worthless 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 AllSigned is unworkable, the default is the next decision and belongs in its own change.

Testing

go build ./...     clean
go vet             clean
make lint          0 issues
make unit-test     0 failures
terraform fmt      clean

smoke-windows is labelled on this PR. Expected outcome: the suite passes, because the opt-out restores the pre-#699 behaviour — which is itself the confirmation that AllSigned is the sole cause. If it fails, the new diagnostics will say why in full, and that is the more valuable result.

Checklist

  • Tests added or updated — diagnostics are exercised by the smoke run; no unit test can reach a real PowerShell
  • Docs updated if user-visible behaviour changed — changelog entry added
  • No debug output or dead code left in

Written by AI: claude-opus-5

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>
@james-nesbitt james-nesbitt added the smoke-windows Run windows smoke test label Nov 12, 2026
@james-nesbitt

Copy link
Copy Markdown
Collaborator Author

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 status=Valid / Signature verified., and AllSigned -NonInteractive still fails with AuthorizationManager check failed because trustedPublisherCount=0. Satisfying it would mean importing Mirantis's certificate into every host's TrustedPublisher store, which makes the check self-certifying.

So the opt-out this PR added, and the field it used, both go away with the revert. What remains worth keeping here is installerDiagnostics — attaching the installer's output, Get-AuthenticodeSignature status and signer, and Get-ExecutionPolicy -List to a failed install. rig truncates the PowerShell error at ~100 characters, which is what made this take a Windows host to diagnose at all.

I'll rebase that onto the revert if it's wanted; otherwise close.

Written by AI: claude-opus-5

@james-nesbitt

Copy link
Copy Markdown
Collaborator Author

not the right approach.

@james-nesbitt
james-nesbitt deleted the PRODENG-3924-windows-allsigned branch November 12, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

smoke-windows Run windows smoke test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant