You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened: I switched my container runtime to containerd for testing purposes and then connected to an EKS Worker Node's shell to debug a pod I was having issues with. I tried to use ctr to examine my running containers and images, but received an error trying to reach out to the default socket address /run/containerd/containerd.sock
$ ctr version
Client:
Version: 1.4.6
Revision: d71fcd7d8303cbf684402823e425e9dd2e99285d
Go version: go1.15.12
ctr: failed to dial "/run/containerd/containerd.sock": context deadline exceeded
I found /etc/containerd/config.toml pretty quickly and was able to identify that we aren't using the default /run/containerd/containerd.sock but /run/dockershim.sock and ctr has the --address global flag (shown below) where I could specify the right address in my commands, or set the CONTAINERD_ADDRESS variable.
$ ctr help
...
--address value, -a value address for containerd's GRPC server (default: "/run/containerd/containerd.sock") [$CONTAINERD_ADDRESS]
...
# Resolved with below variable assignment
$ export CONTAINERD_ADDRESS=/run/dockershim.sock
I understand based on #699 that we are intentionally listening on the dockershim socket so that we don't need to change CNI configuration based on the container runtime.
As such I would propose CONTAINERD_ADDRESS be defined for ec2-user/root by bootstrap.sh (set to /run/dockershim.sock) so that ctr will communicate with containerd by default without needing to set the address yourself. I expect a lot of users will be new to containerd and connecting to an instance to look at containers/images only to find yourself communicating with a broken socket isn't a great first experience.
I'm happy enough to submit a PR to set this variable for ec2-user and root via their ~/.bashrc (or maybe globally via /etc/profile?) if we think that is a reasonable solution. The end goal should be that a new containerd user shouldn't need to debug their CLI as their first experience when connecting to a node.
How to reproduce it (as minimally and precisely as possible):
Create a node group that utilizes the containerd runtime (bootstrap --container-runtime flag). Connect to the node via SSH/SSM and then try to run ctr commands.
The text was updated successfully, but these errors were encountered:
benmccown
changed the title
containerd's cli ctr cannot reach /run/dockershim.sock by default
containerd's cli ctr is not pointing at /run/dockershim.sock by default
Aug 6, 2021
What happened: I switched my container runtime to containerd for testing purposes and then connected to an EKS Worker Node's shell to debug a pod I was having issues with. I tried to use
ctr
to examine my running containers and images, but received an error trying to reach out to the default socket address/run/containerd/containerd.sock
I found /etc/containerd/config.toml pretty quickly and was able to identify that we aren't using the default
/run/containerd/containerd.sock
but/run/dockershim.sock
andctr
has the --address global flag (shown below) where I could specify the right address in my commands, or set the CONTAINERD_ADDRESS variable.I understand based on #699 that we are intentionally listening on the dockershim socket so that we don't need to change CNI configuration based on the container runtime.
As such I would propose CONTAINERD_ADDRESS be defined for ec2-user/root by bootstrap.sh (set to /run/dockershim.sock) so that ctr will communicate with containerd by default without needing to set the address yourself. I expect a lot of users will be new to containerd and connecting to an instance to look at containers/images only to find yourself communicating with a broken socket isn't a great first experience.
I'm happy enough to submit a PR to set this variable for ec2-user and root via their
~/.bashrc
(or maybe globally via/etc/profile
?) if we think that is a reasonable solution. The end goal should be that a new containerd user shouldn't need to debug their CLI as their first experience when connecting to a node.How to reproduce it (as minimally and precisely as possible):
Create a node group that utilizes the containerd runtime (bootstrap --container-runtime flag). Connect to the node via SSH/SSM and then try to run ctr commands.
Anything else we need to know?:
Environment:
aws eks describe-cluster --name <name> --query cluster.platformVersion
): eks.1aws eks describe-cluster --name <name> --query cluster.version
): 1.21uname -a
):cat /etc/eks/release
on a node):The text was updated successfully, but these errors were encountered: