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

don't use loopback addresses on the nodes resolv.conf file #2165

Merged
merged 2 commits into from
Mar 28, 2021

Conversation

aojea
Copy link
Contributor

@aojea aojea commented Mar 27, 2021

we were using the well known name host.docker.internal to get the
host IP address, however, it seems that in some systems it resolves
to a loopback address. We use this address to replace the embedded
docker dns IP address in the resolv.conf.
We can't use a loopback address, because coredns obtains the upstream
dns resolvers from the resolv.conf, and evidentelly, it crashes if the
upstream DNS resolver is a loopback, because it meains that is itself,
and that is a loop.

Fixes: #1975

@k8s-ci-robot k8s-ci-robot requested review from amwat and munnerz March 27, 2021 21:46
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 27, 2021
@aojea
Copy link
Contributor Author

aojea commented Mar 27, 2021

/assign @BenTheElder

we were using the well known name host.docker.internal to get the
host IP address, however, it seems that in some systems it resolves
to a loopback address. We use this address to replace the embedded
docker dns IP address in the resolv.conf.
We can't use a loopback address, because coredns obtains the upstream
dns resolvers from the resolv.conf, and evidentelly, it crashes if the
upstream DNS resolver is a loopback, because it meains that is itself,
and that is a loop.
@BenTheElder
Copy link
Member

PR title seems inaccurate.

@aojea
Copy link
Contributor Author

aojea commented Mar 28, 2021

PR title seems inaccurate.

oh yeah, because at first I though that we could use directly that, until I realise window and mac needs to resolve

@aojea aojea changed the title detect docker host IP based on the default route don't use loopback addresses on the nodes resolv.conf file Mar 28, 2021
@BenTheElder
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 28, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, BenTheElder

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@BenTheElder
Copy link
Member

@aojea
Copy link
Contributor Author

aojea commented Mar 28, 2021

/retest

@aojea
Copy link
Contributor Author

aojea commented Mar 28, 2021

/retest

Kubernetes e2e suite: [sig-apps] ReplicaSet Replace and Patch tests [Conformance] expand_less

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coredns CrashLoopBackOff on Ubuntu 20.04
3 participants