Repository navigation
Conversation
For an image like "clickhouse-server:26.8.2.7@sha256:..." docker.Parse keeps only the digest, so ContainerGetImageTag returned "sha256:..." and no version was found. A new host then got the minimum version 0.0.1: version-gated addons were dropped and the schemer of a new replica took the "engine" path, so CREATE DATABASE ... Engine = Replicated failed with Code: 36. Strip the digest before parsing when the reference still carries a tag. Also set host.Runtime.Version to the version the host reported before building the schemer, so a new replica with a tag that carries no version (a custom build) does not stay on the minimum version. Fixes Altinity#2149 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Igor Kudrin <igor@maestra.io>
This branch has not been deployed
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.
Fixes #2149.
Changes
ContainerGetImageTag: forname:tag@sha256:...docker.Parsekeeps only the digest, so the tag and the version in it were lost. The digest is now stripped before parsing when the reference still carries an explicit tag. A digest-only reference still returnssha256:....reconcileHostTables: setshost.Runtime.Versionto the version the host reported before the schemer is built. Without it a new host whose tag carries no version (a digest, a custom build) keeps the minimum version0.0.1, and the schemer takes theenginepath, soCREATE DATABASE ... Engine = Replicatedfails withCode: 36.TestContainerGetImageTagfor plain, tag+digest (with and without a registry port), digest-only and untagged references. It fails without the fix.Checks
go build ./...,go veton the touched packagesgo test ./pkg/model/... ./pkg/controller/...passesChecklist
next-releasebranch (0.28.0), not intomaster🤖 Generated with Claude Code