ppc64le-cloud / docker-ce-build

Apache License 2.0
0 stars 8 forks source link

Change ndots to 0 after starting dockerd #209

Closed AshwinHIBM closed 2 months ago

AshwinHIBM commented 2 months ago

By default, Kubernetes sets ndots:5 in /etc/resolv.conf causing TestDNSOptions to fail in our ProwJob setup. The solution is to manually override ndots to 0 after starting dockerd. However, we cannot perform this replacement directly in the original file, otherwise we get an error Device busy.

ppc64le-cloud-bot commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AshwinHIBM

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/ppc64le-cloud/docker-ce-build/blob/main/OWNERS)~~ [AshwinHIBM] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
clnperez commented 2 months ago

This seems fine. Can you remind me where we start dockerd? I see there's an ndots value for the dns-option flag (e.g. --dns-option ndots:0) that can be passed at daemon start or container run time. I'm wondering if that's possible in this job.

AshwinHIBM commented 2 months ago

This seems fine. Can you remind me where we start dockerd? I see there's an ndots value for the dns-option flag (e.g. --dns-option ndots:0) that can be passed at daemon start or container run time. I'm wondering if that's possible in this job.

We start it using dockerd-entrypoint.sh. If I use that flag it doesn't start

$ /usr/bin/pgrep dockerd
 <empty output>

I think that might be due to the same problem we talked about earlier: https://github.com/docker-library/docker/blob/master/25/dind/dockerd-entrypoint.sh#L133