[PRODENG-3641] Option 1: add spec.mcr.installCLI to install docker-ee-cli explicitly - #655
Open
james-nesbitt wants to merge 1 commit into
Open
[PRODENG-3641] Option 1: add spec.mcr.installCLI to install docker-ee-cli explicitly#655james-nesbitt wants to merge 1 commit into
james-nesbitt wants to merge 1 commit into
Conversation
Launchpad installs the runtime with a bare `yum install -y docker-ee` (equivalently apt-get/zypper) and relies on package manager dependency resolution to bring in docker-ee-cli. That normally works, and the CLI is present without launchpad naming it. It does not always work. A customer on CIS-hardened RHEL 8.10 ended up with the runtime installed and no CLI, so every later docker command failed on a host that otherwise looked correctly installed. Installing docker-ee-cli by hand and re-running launchpad completed the cluster. Checked every docker-ee package on repos.mirantis.com across rhel 8/9, sles 15 and ubuntu jammy/noble, on both an older and the current channel: docker-ee lists docker-ee-cli only as a Recommends (rpm weak dependency / deb Recommends field), never as a Requires or Depends. Package managers install Recommends by default, which is why this normally works unattended -- but common hardening baselines disable exactly that: dnf/yum's install_weak_deps=false, apt's `APT::Install-Recommends "false"`. That is consistent with, though not yet confirmed against, the reporting customer's CIS-hardened host; their launchpad config and docker-ee.repo are still pending. Add spec.mcr.installCLI, default false, which names the CLI package explicitly, bypassing weak-dependency resolution entirely. It is added to the same package manager invocation as the runtime rather than installed afterwards, so the two cannot resolve to mismatched versions. The default stays false deliberately: Recommends are installed by default on an unhardened host, so installing the CLI unconditionally would change what every existing cluster installs in order to work around an environment-specific setting. The package list lives in one helper, configurer.MCRPackages, rather than being repeated across the three Linux configurers, so the package names cannot drift between them. Windows is unaffected and the value is documented as ignored there: MCR is installed via install.ps1, which ships the CLI in the same archive with no separate package. Refs PRODENG-3641 Written by AI: claude-sonnet-5
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
Adds
spec.mcr.installCLI(bool, defaultfalse). When set, the docker CLI packagedocker-ee-cliis named explicitly in the MCR install.This is one of two divergent PRs for PRODENG-3641. The alternative is #656 (
installRecommends). They are alternatives, not companions — pick one.Why
Launchpad installs the runtime with a bare
yum install -y docker-ee(equivalently apt-get/zypper) and relies on the package manager to bring in the CLI. A customer on CIS-hardened RHEL 8.10 ended up with the runtime installed and no CLI, so every later docker command failed on a host that otherwise looked correctly installed. Installingdocker-ee-cliby hand and re-running launchpad completed the cluster.I checked why. Every
docker-eepackage on repos.mirantis.com listsdocker-ee-clias a recommended package (rpmRecommends/ debRecommends), never as a hardRequires/Depends:Package managers install recommended packages by default, which is why this normally works unattended. Hardening baselines commonly disable exactly that —
install_weak_deps=false(dnf/yum),APT::Install-Recommends "false"(apt),solver.onlyRequires(zypper). Naming the package explicitly bypasses that resolution entirely.How
MCRConfig.InstallCLI—installCLIin yaml, documented including that Windows ignores it.configurer.MCRPackages()returns the package list, so the names live in one place rather than being repeated across three configurers.Default stays
falsedeliberately: recommended packages are installed by default on an unhardened host, so installing the CLI unconditionally would change what every existing cluster installs in order to work around an environment-specific setting.Trade-off versus the alternative
InstallPackage. Cost: a hardcoded package list that can drift from repository metadata, and it does not addresscri-dockerd-ee, which is also only a recommended package and which launchpad never installs explicitly.installRecommendsPR: delegates the list to repository metadata so it cannot drift and coverscri-dockerd-eetoo. Cost: on deb hosts it additionally installsgit,pigz,procps,xz-utils,ca-certificates,libltdl7,docker-ee-rootless-extrasand akernelpackage; and it requires running package-manager commands directly on all three families.Testing
TestMCRPackages— default is runtime-only;installCLIadds the CLI; runtime stays first and both are returned together for a single transaction.TestMCRConfig_InstallCLI— the yaml key round-trips (absent → false,true/falsehonoured). A wrong struct tag would silently ignore the setting and reintroduce the bug for anyone opting in.make lintclean (0 issues),go vet,go vet -tags=integration, gofmt, full unit suite green.Not smoke-tested: the failure mode needs a host with weak dependencies disabled, which no smoke platform currently provides.
Open question
This is a mitigation, not a root-cause fix. The reason resolution skipped the CLI on that specific host is still unconfirmed — the customer's launchpad config,
docker-ee.repoandapply.logwere requested on the ticket and have not arrived. If theirinstall_weak_depsis set, that confirms it; if not, something else is going on and this flag may not help them.Links
Written by AI: claude-sonnet-5