Skip to content

fix pinnedImages image config json name#11221

Closed
pacoxu wants to merge 2 commits intocontainerd:mainfrom
pacoxu:config-sandbox-image
Closed

fix pinnedImages image config json name#11221
pacoxu wants to merge 2 commits intocontainerd:mainfrom
pacoxu:config-sandbox-image

Conversation

@pacoxu
Copy link
Contributor

@pacoxu pacoxu commented Jan 6, 2025

This is introduced in https://github.com/containerd/containerd/pull/9617/files#diff-e8d6dbb2c75752c173c570eabb9961d5b0f3273b682788f2d7eab2f5ffd5d7d6R280.

It seems to be a typo.

cc @fuweid @dmcgowan

BTW, I saw this when looking into kubernetes/kubeadm#3146. In containerd v2.0, crictl info will not include image related configurations, including the sandbox image. Is this intended?

@k8s-ci-robot
Copy link

Hi @pacoxu. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@dosubot dosubot bot added the kind/cleanup label Jan 6, 2025
Comment on lines 292 to +294
// Migrated from:
// (PluginConfig).SandboxImage string `toml:"sandbox_image" json:"sandboxImage"`
PinnedImages map[string]string `toml:"pinned_images" json:"pinned_images"`
PinnedImages map[string]string `toml:"pinned_images" json:"pinnedImages"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious; will this fix the linked issue? Because I see that mentions code that looks for (commented above) sandBoxImage, not pinnedImages (plural); https://github.com/kubernetes/kubernetes/blob/8f8c94a04d00e59d286fe4387197bc62c6a4f374/cmd/kubeadm/app/preflight/checks.go#L841C2-L848C3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not the same issue.

Just find this potential typo during looking into that issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue is related to #11114 and #11117

Copy link

@afbjorklund afbjorklund Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sandboxImage vs. pinnedImages is handled in this configuration migration:

        var pinnedImages map[string]interface{}
        if v, ok := dst["pinned_images"]; ok {
                pinnedImages = v.(map[string]interface{})
        } else {
                pinnedImages = map[string]interface{}{}
        }

        if simage, ok := src["sandbox_image"]; ok {
                pinnedImages["sandbox"] = simage
        }
        if len(pinnedImages) > 0 {
                dst["pinned_images"] = pinnedImages
        }

when it moved from the RuntimeConfig to the ImageConfig, in 3baf5ed

You still get some warning, even after the migration (until updated to v3)

level=warning msg="Ignoring unknown key in TOML for plugin" error="strict mode: fields in the document are missing in the target struct key=sandbox_image plugin=io.containerd.cri.v1.runtime

maybe it needs to delete the sandbox_image, during the above process?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it needs to delete the sandbox_image, during the above process?

Yeah there are many other fields that also have the warning even after the migration. I have a PR to fix that a while ago #10980. Need to revisit the PR and see if I can get some review there then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djdongjin #10980 was merged.

@thaJeztah Could you take a look and see if the current PR is meaningful?

@pacoxu pacoxu force-pushed the config-sandbox-image branch from e20779d to b98697d Compare June 13, 2025 06:35
@k8s-ci-robot
Copy link

Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@pacoxu pacoxu closed this Nov 4, 2025
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Pull Request Review Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants