Skip to content

[PRODENG-3393] Require explicit spec.mcr.channel; fix Ubuntu apt noninteractive - #635

Merged
james-nesbitt merged 7 commits into
mainfrom
PRODENG-3393
Jul 22, 2026
Merged

[PRODENG-3393] Require explicit spec.mcr.channel; fix Ubuntu apt noninteractive#635
james-nesbitt merged 7 commits into
mainfrom
PRODENG-3393

Conversation

@james-nesbitt

@james-nesbitt james-nesbitt commented May 27, 2026

Copy link
Copy Markdown
Collaborator

What

Require spec.mcr.channel explicitly in the launchpad config and fix DEBIAN_FRONTEND on the Ubuntu MCR apt-get update call.

Why

Users following the MKE 3.8 doc template (which omits the mcr block) hit a silent default that caused MCR install failures. Making mcr.channel required produces a clear parse-time error before any install begins, consistent with how spec.mke.version is handled.

How

  • Removed channel default from MCRConfig.SetDefaults() — channel is now intentionally undefaulted
  • Added validation in ClusterSpec.UnmarshalYAML: empty channel after unmarshal returns a fatal error with an actionable message (e.g. channel: stable-29.4)
  • Set DEBIAN_FRONTEND=noninteractive on the apt-get update call in the Ubuntu configurer (InstallPackage from rig already sets it for install calls)
  • Added policy-rc.d comment documenting the deferred dpkg post-install daemon startup concern

Testing

  • TestMissingMCRChannelFails: verifies parse-time error for absent mcr block
  • TestMCRConfig_ChannelRequired: verifies channel is not silently defaulted
  • All existing cluster and migration tests updated and passing
  • make unit-test passes (24/24 packages)

Links

Checklist

  • Tests added or updated
  • Docs updated if user-visible behaviour changed
  • No debug output or dead code left in

@james-nesbitt james-nesbitt added smoke-modern Run modern smoke test smoke-legacy Run legacy smoke test labels May 27, 2026
james-nesbitt and others added 6 commits July 22, 2026 08:27
- Remove the default channel from MCRConfig.SetDefaults() — channel is now
  a required field. An absent or empty spec.mcr.channel produces a clear
  fatal error at parse time, consistent with how spec.mke.version is handled.
- Add validation in ClusterSpec.UnmarshalYAML: if MCR channel is empty after
  unmarshal (mcr block absent or channel field omitted), return an actionable
  error directing the user to set e.g. channel: stable-29.4.
- Set DEBIAN_FRONTEND=noninteractive on the apt-get update call in the Ubuntu
  MCR installer (InstallPackage from rig already sets it for install calls).
- Add policy-rc.d comment documenting the deferred dpkg post-install concern.
- Update all cluster_test.go fixtures to include mcr.channel: stable.
- Add TestMissingMCRChannelFails and TestMCRConfig_ChannelRequired tests.

PRODENG-3393
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Nesbitt <jnesbitt@mirantis.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Nesbitt <jnesbitt@mirantis.com>
rocky8 AMI (owner 792107900819, Rocky-8-EC2-Base-8.*.x86_64) is no
longer available in us-east-1. rhel8 resolves fine and has MCR packages
on repos.mirantis.com. AlmaLinux was considered but has no MCR packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Nesbitt <jnesbitt@mirantis.com>
SLES 12 SP5 AMIs are available in us-east-1 (owner 013907871322) and
MCR packages exist at repos.mirantis.com/sles/12/. Added as a worker
node to verify sles12 compatibility with MKE 3.8.8/MCR stable-25.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Nesbitt <jnesbitt@mirantis.com>
Rocky 8's official AMI (owner 792107900819, Rocky-8-EC2-Base-8.*.x86_64)
is back in us-east-1 as of 2026-06-27 (Rocky-8-EC2-Base-8.10-20260625.x86_64,
public, no product code, dry-run launch succeeds) -- the gap that
justified dropping it predates that republish. Restore MngrRocky8/WrkRocky8
alongside rhel8/sles12/ubuntu22.

Desired legacy coverage per team decision: ubuntu22, rhel8, rocky8, sles12.
sles12 is expected to fail; kept in (worker-only) to observe the failure
before deciding whether to drop it.

Also drop PRODENG-3393-plan.md, a scratch planning doc not meant to ship.
sles12 (SLES 12 SP5) fails launchpad's Validate Hosts phase:
  failed to find host local addresses: failed to get local addresses:
  command failed: client exec: ssh session wait: Process exited with status 4

Root cause: pkg/configurer/linux.go LocalAddresses() runs
`hostname --all-ip-addresses`, a GNU/net-tools extension flag SLES 12's
older hostname implementation doesn't support. All other legacy hosts
(rhel8, rocky8, ubuntu22 managers/workers) pass validation cleanly.

Filed PRODENG-3588 to fix LocalAddresses() portably and re-add sles12
once verified against a real SLES 12 SP5 instance.

Written by AI: claude-sonnet-5
@james-nesbitt

james-nesbitt commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

Final state

Legacy smoke coverage restored to ubuntu22 / rhel8 / rocky8, sles12 dropped (tracked separately).

  • rocky8 restored — Rocky Linux's official AMI (owner 792107900819, Rocky-8-EC2-Base-8.*.x86_64) was absent in us-east-1 when this PR was authored; it was republished Rocky-8-EC2-Base-8.10-20260625.x86_64 on 2026-06-27, after which the gap that justified dropping MngrRocky8/WrkRocky8 no longer applies. Confirmed the AMI is public, unrestricted, and launchable (dry-run RunInstances succeeds).
  • sles12 tried, then dropped — added as a worker to see whether it's viable again. It fails launchpad's Validate Hosts phase:
    failed to find host local addresses: failed to get local addresses:
    command failed: client exec: ssh session wait: Process exited with status 4
    
    Root cause: pkg/configurer/linux.go's LocalAddresses() runs hostname --all-ip-addresses, a GNU/net-tools extension SLES 12 SP5's older hostname doesn't support. All other hosts in the same run (rhel8, rocky8, ubuntu22 managers/workers) passed validation and provisioned cleanly — isolated to SLES 12. Filed PRODENG-3588 to fix LocalAddresses() portably and re-add sles12 once verified.
  • Unrelated infra blocker found and cleared: an earlier smoke-legacy run failed on VpcLimitExceeded — the account had accumulated ~10 orphaned launchpad-smoke-test VPCs (some from early June) whose terraform destroy never ran to completion. Torn down (ASGs, NLBs/target groups, IGW, subnets, security groups, VPC) to free quota; not a code issue.
  • PRODENG-3393-plan.md scratch file removed from the diff.

CI: unit tests (macOS/Ubuntu/Windows), CodeQL, and static analysis all pass. smoke-legacy is re-running now against the sles12-dropped commit (86fd9b5) to confirm the final rhel8/rocky8/ubuntu22 matrix is green end to end.

Still needs the required review approval to merge.

Written by AI: claude-sonnet-5

@james-nesbitt
james-nesbitt merged commit a430904 into main Jul 22, 2026
11 checks passed
@james-nesbitt
james-nesbitt deleted the PRODENG-3393 branch July 22, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

smoke-legacy Run legacy smoke test smoke-modern Run modern smoke test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant