Skip to content

Add DNS lookup plugin#1080

Merged
k8s-ci-robot merged 2 commits into
kubernetes:masterfrom
adrianmoisey:add-dns-test
Oct 5, 2025
Merged

Add DNS lookup plugin#1080
k8s-ci-robot merged 2 commits into
kubernetes:masterfrom
adrianmoisey:add-dns-test

Conversation

@adrianmoisey

Copy link
Copy Markdown
Member

Add a DNS lookup plugin, as per #991

I haven't done a curl yet, I just want to see if this is the right track

cc @aojea

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 21, 2025
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 21, 2025
@adrianmoisey

Copy link
Copy Markdown
Member Author

/retest

1 similar comment
@adrianmoisey

Copy link
Copy Markdown
Member Author

/retest

readonly KUBERNETES_SERVICE='kubernetes.default'

# Check getent command is present
if ! command -v getent >/dev/null; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getent seems the most common tool available in a host, but do we want to use hosts or nslookup just in case getent is not available?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I picked it since I assumed it would be the most available. I could change the logic to fall back to other tools, if getent isn't available?
May be in this order:

  1. getent
  2. host
  3. nslookup

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be good to know what install each tool in debian and red hat per example, I think gerent comes as part as libc so that makes it pretty common

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using containers, and I don't know if that's a good idea:

Red Hat:

adrian@Adrians-MacBook-Pro:~$ docker run redhat/ubi10 getent hosts example.com
2600:1406:bc00:53::b81e:94c8 example.com
2600:1406:bc00:53::b81e:94ce example.com
2600:1408:ec00:36::1736:7f24 example.com
2600:1408:ec00:36::1736:7f31 example.com
2600:1406:3a00:21::173e:2e65 example.com
2600:1406:3a00:21::173e:2e66 example.com
adrian@Adrians-MacBook-Pro:~$ docker run redhat/ubi10 host example.com
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "host": executable file not found in $PATH

Run 'docker run --help' for more information
adrian@Adrians-MacBook-Pro:~$ docker run redhat/ubi10 nslookup example.com
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "nslookup": executable file not found in $PATH

Run 'docker run --help' for more information

Debian:

adrian@Adrians-MacBook-Pro:~$ docker run debian:latest getent hosts example.com
2600:1406:bc00:53::b81e:94c8 example.com
2600:1406:bc00:53::b81e:94ce example.com
2600:1408:ec00:36::1736:7f24 example.com
2600:1408:ec00:36::1736:7f31 example.com
2600:1406:3a00:21::173e:2e65 example.com
2600:1406:3a00:21::173e:2e66 example.com
adrian@Adrians-MacBook-Pro:~$ docker run debian:latest host example.com
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "host": executable file not found in $PATH

Run 'docker run --help' for more information
adrian@Adrians-MacBook-Pro:~$ docker run debian:latest nslookup example.com
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "nslookup": executable file not found in $PATH

Run 'docker run --help' for more information

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems getent is the way to go

@aojea

aojea commented Jul 28, 2025

Copy link
Copy Markdown
Member

LGTM

@adrianmoisey

Copy link
Copy Markdown
Member Author

/assign @derekwaynecarr

@aojea

aojea commented Aug 7, 2025

Copy link
Copy Markdown
Member

I do not think derek is very active these days, let me tag @danwinship since he was also interested.

@SergeyKanzhelev can you recommend some active mantainers to review this PR?

@vteratipally

Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@vteratipally: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@vteratipally

Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Aug 7, 2025
@adrianmoisey

Copy link
Copy Markdown
Member Author

/retest

@adrianmoisey

Copy link
Copy Markdown
Member Author

Hey @derekwaynecarr any chance I can get a review here?

@SergeyKanzhelev

Copy link
Copy Markdown
Member

We are wrapping up the new versioning. Trying to close on branch creation: #1093

What version do you hope to have it in?

@adrianmoisey

Copy link
Copy Markdown
Member Author

Oh, there's no rush to get it into a specific version. It's just been sitting for a while and I wasn't sure if I should close this or try get it merged.

Comment thread config/plugin/dns_problem.sh Outdated
@danwinship

Copy link
Copy Markdown
Contributor

let me tag @danwinship since he was also interested.

I don't really know much about node-problem-detector, but yes, this seems to do what I was thinking

Co-authored-by: Dan Winship <danwinship@redhat.com>

@hakman hakman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 5, 2025
@hakman

hakman commented Oct 5, 2025

Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 5, 2025
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianmoisey, hakman, vteratipally

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

The pull request process is described here

Details 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

@k8s-ci-robot k8s-ci-robot merged commit 545516f into kubernetes:master Oct 5, 2025
15 checks passed
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants