[PRODENG-3393] Require explicit spec.mcr.channel; fix Ubuntu apt noninteractive#635
Open
james-nesbitt wants to merge 1 commit into
Open
[PRODENG-3393] Require explicit spec.mcr.channel; fix Ubuntu apt noninteractive#635james-nesbitt wants to merge 1 commit into
james-nesbitt wants to merge 1 commit into
Conversation
- 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
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.
What
Require
spec.mcr.channelexplicitly in the launchpad config and fixDEBIAN_FRONTENDon the Ubuntu MCR apt-get update call.Why
Users following the MKE 3.8 doc template (which omits the
mcrblock) hit a silent default that caused MCR install failures. Makingmcr.channelrequired produces a clear parse-time error before any install begins, consistent with howspec.mke.versionis handled.How
MCRConfig.SetDefaults()— channel is now intentionally undefaultedClusterSpec.UnmarshalYAML: empty channel after unmarshal returns a fatal error with an actionable message (e.g.channel: stable-29.4)DEBIAN_FRONTEND=noninteractiveon theapt-get updatecall in the Ubuntu configurer (InstallPackagefrom rig already sets it for install calls)Testing
TestMissingMCRChannelFails: verifies parse-time error for absentmcrblockTestMCRConfig_ChannelRequired: verifies channel is not silently defaultedmake unit-testpasses (24/24 packages)Links
Checklist