-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Ability to configure hostPath mount for /var/run/docker.sock
#901
Comments
@jessesuen not Azure 、is private cloud 、i maybe found reason . /var/lib/docker "ln -s" other dir |
I've had the same issue, and as mentioned above it seems to be caused by having the docker path set to something other than /var/lib/docker (in my case it was set to /home/docker/data). We're using Rancher, which has a containerized kubelet, so I had to exec into the kubelet container and make a symbolic link from /home/docker/data to /var/lib/docker using "ln -s /home/docker/data/* /var/lib/docker". This seems to have fixed the issue and the volume mounts ok and workflows run. Is there a way to configure the argoexec wait container to take in a different hostPath in its volume configuration? |
I have the same issue. |
We will add a config setting in the configmap to allow specification of the location of docker.sock |
Hey @jessesuen, I'm using a dind k8s cluster to test argo, and unfortunately that issue prevents me from testing it ... |
/var/run/docker.sock
As of v2.3, we no longer mount docker-lib (it was not necessary), but we still do mount /var/run/docker.sock for docker executor. Still need to add a flag in workflow-controller-config to allow user to configure this. |
Would this prevent using containerd for execution as well? In K3s recommended default mode, containerd is used instead of docker. |
For containerd, you will want to use the pns executor. |
Can you point me how to do this with containerd (on k3s)? I will be happy to add it to the docs afterwards.
✅ UPDATEThis setting needs to be applied to the configmap (kinda obvious when I think about it :D):
With this config applied, the following hello-world-command succeeds with containerd (in k3s):
|
…oj#901) * feat: Make native nats eventbus max message age configurable. Closes argoproj#856 * doc change * comments * re-run codegen
Is this a BUG REPORT or FEATURE REQUEST?:
Name: hello-world-w4nx8
Namespace: default
Node: 192.168.181.93/192.168.181.93
Start Time: Tue, 03 Jul 2018 13:02:39 +0800
Labels: workflows.argoproj.io/completed=false
workflows.argoproj.io/workflow=hello-world-w4nx8
Annotations: workflows.argoproj.io/node-name=hello-world-w4nx8
workflows.argoproj.io/template={"name":"whalesay","inputs":{},"outputs":{},"metadata":{},"container":{"name":"","image":"docker/whalesay:latest","command":["cowsay"],"args":["hello world"],"resources"...
Status: Pending
IP:
Controlled By: Workflow/hello-world-w4nx8
Containers:
main:
Container ID:
Image: docker/whalesay:latest
Image ID:
Port:
Host Port:
Command:
cowsay
Args:
hello world
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment:
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-2rvnj (ro)
wait:
Container ID:
Image: argoproj/argoexec:v2.1.1
Image ID:
Port:
Host Port:
Command:
argoexec
Args:
wait
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment:
ARGO_POD_IP: (v1:status.podIP)
ARGO_POD_NAME: hello-world-w4nx8 (v1:metadata.name)
ARGO_NAMESPACE: default (v1:metadata.namespace)
Mounts:
/argo/podmetadata from podmetadata (rw)
/var/lib/docker from docker-lib (ro)
/var/run/docker.sock from docker-sock (ro)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-2rvnj (ro)
Conditions:
Type Status
Initialized True
Ready False
PodScheduled True
Volumes:
podmetadata:
Type: DownwardAPI (a volume populated by information about the pod)
Items:
metadata.annotations -> annotations
docker-lib:
Type: HostPath (bare host directory volume)
Path: /var/lib/docker
HostPathType: Directory
docker-sock:
Type: HostPath (bare host directory volume)
Path: /var/run/docker.sock
HostPathType: Socket
default-token-2rvnj:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-2rvnj
Optional: false
QoS Class: BestEffort
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
Normal Scheduled 34m default-scheduler Successfully assigned hello-world-w4nx8 to 192.168.181.93
Normal SuccessfulMountVolume 34m kubelet, 192.168.181.93 MountVolume.SetUp succeeded for volume "docker-sock"
Normal SuccessfulMountVolume 34m kubelet, 192.168.181.93 MountVolume.SetUp succeeded for volume "podmetadata"
Normal SuccessfulMountVolume 34m kubelet, 192.168.181.93 MountVolume.SetUp succeeded for volume "default-token-2rvnj"
Warning FailedMount 14m (x9 over 32m) kubelet, 192.168.181.93 Unable to mount volumes for pod "hello-world-w4nx8_default(4f0cfa45-7e7e-11e8-b28c-005056a55893)": timeout expired waiting for volumes to attach or mount for pod "default"/"hello-world-w4nx8". list of unmounted volumes=[docker-lib]. list of unattached volumes=[podmetadata docker-lib docker-sock default-token-2rvnj]
Warning FailedMount 3m (x23 over 34m) kubelet, 192.168.181.93 MountVolume.SetUp failed for volume "docker-lib" : hostPath type check failed: /var/lib/docker is not a directory
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
Other debugging information (if applicable):
The text was updated successfully, but these errors were encountered: