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

Bug in runc causes kubectl exec failure after systemd daemon-reload #6064

Closed
clrxbl opened this issue Aug 31, 2022 · 6 comments
Closed

Bug in runc causes kubectl exec failure after systemd daemon-reload #6064

clrxbl opened this issue Aug 31, 2022 · 6 comments

Comments

@clrxbl
Copy link

clrxbl commented Aug 31, 2022

Is your feature request related to a problem? Please describe.
Yes. The runc version in k3s' containerd version 1.6.6 contains a regression that prevents anyone from executing a command and attaching to the container's TTY (exec -it) whenever someone runs systemctl daemon-reload. Alternatively, the user may run into this issue on SELinux-enforced systems.

containerd/containerd#7219

Describe the solution you'd like
I am not sure how k3s maintainers usually handle these issues, but I would very much like to see a k3s release that updates runc to 1.1.4.

Describe alternatives you've considered
Downgrade k3s to 1.23.

Additional context

❯ kubectl exec -it -n kube-system cilium-6lqp9 -- cilium status
Defaulted container "cilium-agent" out of: cilium-agent, mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), wait-for-node-init (init), clean-cilium-state (init)
error: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "b67e6e00172071996430dac5c97352e4d0c9fa3b3888e8daece5197c4649b4d1": OCI runtime exec failed: exec failed: unable to start container process: open /dev/pts/0: operation not permitted: unknown
@brandond
Copy link
Contributor

Is this a problem with the runc binary that we're including, or the runc module used by containerd? They're not necessarily the same.

@brandond
Copy link
Contributor

I'll think it should be easy to update runc in both locations, but I echo this comment: containerd/containerd#7219 (comment)

@brandond
Copy link
Contributor

According to opencontainers/runc#3551 (comment) it has to do with the systemd group driver, and systemd mucking about with permissions when it reloads. Interesting...

@clrxbl
Copy link
Author

clrxbl commented Aug 31, 2022

Is this a problem with the runc binary that we're including, or the runc module used by containerd? They're not necessarily the same.

Unsure.

@brandond brandond added this to the v1.24.5+k3s1 milestone Aug 31, 2022
@brandond brandond self-assigned this Aug 31, 2022
@brandond brandond added this to To Triage in Development [DEPRECATED] via automation Aug 31, 2022
@brandond brandond moved this from To Triage to Next Up in Development [DEPRECATED] Aug 31, 2022
@brandond brandond changed the title Possibility to upgrade runc to 1.1.4? Bug in runc causes kubectl exec failure after systemd daemon-reload Sep 1, 2022
@ShylajaDevadiga ShylajaDevadiga self-assigned this Sep 7, 2022
@brandond brandond moved this from Next Up to To Test in Development [DEPRECATED] Sep 8, 2022
@brandond brandond modified the milestones: v1.24.5+k3s1, v1.25.0+k3s1 Sep 8, 2022
@kolyshkin
Copy link
Contributor

Is this a problem with the runc binary that we're including, or the runc module used by containerd? They're not necessarily the same.

It's the binary (unless your software is using runc/libcontainer/cgroups/systemd package to create systemd units on a cgroup v1 system, in which case it's also the vendored packages).

@est-suse
Copy link
Contributor

Validated on with /

Environment Details

Infrastructure

  • Cloud
  • Hosted

Node(s) CPU architecture, OS, and Version:

PRETTY_NAME="Ubuntu Jammy Jellyfish (development branch)"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Cluster Configuration:

1 server 1 agent

Testing Steps

$ /var/lib/rancher/k3s/data/current# bin/runc -v

$ /var/lib/rancher/k3s/data/current# bin/runc -v
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

5 participants