Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crio 1.27 has default image registry.k8s.io/pause:3.6 #6985

Closed
Jeansen opened this issue May 30, 2023 · 21 comments
Closed

crio 1.27 has default image registry.k8s.io/pause:3.6 #6985

Jeansen opened this issue May 30, 2023 · 21 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@Jeansen
Copy link

Jeansen commented May 30, 2023

What happened?

Creating a cluster wie kubeadm 1.27 and cri-o 1.27 shows:

W0530 09:51:11.146538   50207 checks.go:835] detected that the sandbox image "registry.k8s.io/pause:3.6" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "registry.k8s.io/pause:3.9" as the CRI sandbox image.

Although, kubeadm config images list gives:

 back to the nearest etcd version (3.5.7-0)
registry.k8s.io/kube-apiserver:v1.27.2
registry.k8s.io/kube-controller-manager:v1.27.2
registry.k8s.io/kube-scheduler:v1.27.2
registry.k8s.io/kube-proxy:v1.27.2
registry.k8s.io/pause:3.9
registry.k8s.io/etcd:3.5.7-0
registry.k8s.io/coredns/coredns:v1.10.1

cri-o overwrites the kubeadm image for pause with its default, which currently is 3.6. When I set the relevant config entry to in /etc/crio/crio.conf, e.g. pause_image = "registry.k8s.io/pause:3.9 and restart the crio service, kubeadm no longer complains.

What did you expect to happen?

No warning and the right pause image in use when creating a cluster with kubeadm in the same version as crio.

How can we reproduce it (as minimally and precisely as possible)?

Follow https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/.
In Essence, it would be enough to have von VM running Ubuntu or Debian with kubeadm and crio installed in version 1.27 and then running kubeadm init.

Anything else we need to know?

No response

CRI-O and Kubernetes version

crio version 1.27.0
Version:        1.27.0
GitCommit:      unknown
GitCommitDate:  unknown
GitTreeState:   clean
BuildDate:      2023-04-25T18:11:41Z
GoVersion:      go1.19
Compiler:       gc
Platform:       linux/amd64
Linkmode:       dynamic
BuildTags:
  apparmor
  seccomp
  containers_image_ostree_stub
  exclude_graphdriver_btrfs
  exclude_graphdriver_devicemapper
  containers_image_openpgp
LDFlags:          -s -w -X github.com/cri-o/cri-o/internal/pkg/criocli.DefaultsPath="" -X github.com/cri-o/cri-o/internal/version.buildDate=2023-04-25T18:11:41Z
SeccompEnabled:   true
AppArmorEnabled:  false
{
  "clientVersion": {
    "major": "1",
    "minor": "27",
    "gitVersion": "v1.27.2",
    "gitCommit": "7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647",
    "gitTreeState": "clean",
    "buildDate": "2023-05-17T14:20:07Z",
    "goVersion": "go1.20.4",
    "compiler": "gc",
    "platform": "linux/amd64"
  },
  "kustomizeVersion": "v5.0.1",
  "serverVersion": {
    "major": "1",
    "minor": "27",
    "gitVersion": "v1.27.2",
    "gitCommit": "7f6f68fdabc4df88cfea2dcf9a19b2b830f1e647",
    "gitTreeState": "clean",
    "buildDate": "2023-05-17T14:13:28Z",
    "goVersion": "go1.20.4",
    "compiler": "gc",
    "platform": "linux/amd64"
  }
}

OS version

# On Linux:
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ uname -a
Linux master0-k8s 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) x86_64 GNU/Linux

Additional environment details (AWS, VirtualBox, physical, etc.)

All my Nodes are created with Vagrant/Libvirt.
@Jeansen Jeansen added the kind/bug Categorizes issue or PR as related to a bug. label May 30, 2023
@sohankunkerkar sohankunkerkar self-assigned this May 30, 2023
@sohankunkerkar
Copy link
Member

sohankunkerkar commented May 30, 2023

This change needs to get backported to 1.27, I will put up a PR shortly.

@Jeansen
Copy link
Author

Jeansen commented May 30, 2023

Great, thx. But how about the fact that crio overwrites kubernetes? Is this by design?

@haircommander
Copy link
Member

currently crio and kubelet both have independent ideas of what pause image to use. Eventually, CRI implementation should specify the Pinned field of the ImageStatus response to tell kubelet to not garbage collect that image. Then, the kubelet can stop being in the business of knowing the pause image. CRI-O has recently added support for this, though I'm not sure if containerd has yet.

@afbjorklund
Copy link
Contributor

afbjorklund commented May 31, 2023

There should be a warning in place now, if the container runtime has not been updated to use the kubeadm version...

875c3a2

@afbjorklund
Copy link
Contributor

afbjorklund commented May 31, 2023

Great, thx. But how about the fact that crio overwrites kubernetes? Is this by design?

It is at least the documented workaround, kubernetes requires the user to reconfigure their runtimes.

https://kubernetes.io/docs/setup/production-environment/container-runtimes/

Out of the box, they will probably use the wrong pause image - and might even use the wrong cgroups.

@Jeansen
Copy link
Author

Jeansen commented May 31, 2023

@afbjorklund Thank you for the insight but I cannot see that is is a requirement to overwrite the sandbox (pause) image, only an option that on CAN set.

@Jeansen
Copy link
Author

Jeansen commented May 31, 2023

There should be a warning in place now, if the container runtime has not been updated to use the kubeadm version...

875c3a2

Yes, there is such a warning. That's how I initially came across the fact that an older pause image (3.6) had been used, instead of a more recent one (3.9).

@afbjorklund
Copy link
Contributor

afbjorklund commented May 31, 2023

I backported the warning to cri-o and docker, since it was only implemented (and tested) for containerd

I think once the backport of the default image to cri-o 1.27 is done, it shouldn't need config (the default should be OK)

@Jeansen
Copy link
Author

Jeansen commented Jun 1, 2023

I suggest to keep this ticket open until I can verify it in a test.

@github-actions
Copy link

github-actions bot commented Jul 2, 2023

A friendly reminder that this issue had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 2, 2023
@haircommander haircommander removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 3, 2023
@haircommander
Copy link
Member

@Jeansen what's the status of your check?

@Jeansen
Copy link
Author

Jeansen commented Jul 6, 2023

@haircommander Oh, sorry. It's vacation time in Germany ;-) I'll check soon and report here.

@Jeansen
Copy link
Author

Jeansen commented Jul 16, 2023

Installing from the repository I initially could not see any changes.

During kubeadm setup, I still get:
W0716 13:21:33.701119 4044 checks.go:835] detected that the sandbox image "registry.k8s.io/pause:3.6" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "registry.k8s.io/pause:3.9" as the CRI sandbox image.

Anyway, installing without any additional configuration settings afterwards shows me, that kubelet runs with version 3.9:

/usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime-endpoint=unix:///var/run/crio/crio.sock --pod-infra-container-image=registry.k8s.io/pause:3.9

I assume, this is fine now?

@haircommander
Copy link
Member

if you run crio config | grep pause I'm guessing there's a configuration file you have present that is setting 3.6, if you're using a binary whose internal version is 3.9

@Jeansen
Copy link
Author

Jeansen commented Aug 3, 2023

No, there is nothing set. Like I wrote, I use the default settings.

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

A friendly reminder that this issue had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 3, 2023
@shqear93
Copy link

same here

@haircommander
Copy link
Member

Installing from the repository I initially could not see any changes.

During kubeadm setup, I still get: W0716 13:21:33.701119 4044 checks.go:835] detected that the sandbox image "registry.k8s.io/pause:3.6" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "registry.k8s.io/pause:3.9" as the CRI sandbox image.

Anyway, installing without any additional configuration settings afterwards shows me, that kubelet runs with version 3.9:

/usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --container-runtime-endpoint=unix:///var/run/crio/crio.sock --pod-infra-container-image=registry.k8s.io/pause:3.9

I assume, this is fine now?

this seems like there's some kubeadm field that's getting in the way. If your crio configuration says 3.9 then that's the one that's being used, regardless of what kubelet/kubeadm ask.

@sohankunkerkar sohankunkerkar removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 26, 2023
@afbjorklund
Copy link
Contributor

If the crio config was indeed also changed to 3.9, then it should be reflected in crictl info... It probably needs a reload, though (but the upgrade should have done that)

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 28, 2023
@haircommander
Copy link
Member

I think this can be closed, CRI-O is using the pause image it's configured to. kubeadm/kubelet can only ask and CRI-O will ignore :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

5 participants