kubespray icon indicating copy to clipboard operation
kubespray copied to clipboard

Avoid empty "supersede domain-name-servers" directives for dhclient.conf

Open spantaleev opened this issue 2 years ago • 4 comments

This patch aims to be minimal and intentionally:

  • does not change the generation logic for supersede_domain and supersede_search
  • does not change how nameserverentries (for NetworkManager) is built

It seems like nameserverentries in the "Generate nameservers for resolvconf, including cluster DNS" task is built the same way as dhclient_supersede_nameserver_entries_list. However, nameserverentries in the "Generate nameservers for resolvconf, not including cluster DNS" task (below) is built differently for some reason. It includes configured_nameservers as well. Due to these differences, I have refrained from reusing the same building logic (dhclient_supersede_nameserver_entries_list) for both.

If the configured_nameservers addition can be removed or made to apply to dhclient as well, we could potentially build a single list and then generate the nameserverentries and supersede_nameserver strings from it.

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixes a dhclient.conf corruption on etcd-only nodes on non-Network-Manager systems (Ubuntu 20.04, etc.)

Which issue(s) this PR fixes:

Fixes https://github.com/kubernetes-sigs/kubespray/issues/10947

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?:

NONE

spantaleev avatar Feb 23 '24 08:02 spantaleev

Hi @spantaleev. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

k8s-ci-robot avatar Feb 23 '24 08:02 k8s-ci-robot

/ok-to-test

yankay avatar Feb 26 '24 07:02 yankay

Review feedback has been addressed and the patch has been rebased (it was in a state of conflict after da3ff1cc117d688f55bd440fa8254d1bdc).

Perhaps it's ready for merging now?

spantaleev avatar May 01 '24 06:05 spantaleev

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jul 30 '24 11:07 k8s-triage-robot

/approve

ant31 avatar Aug 06 '24 10:08 ant31

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ant31, MrFreezeex, spantaleev

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

k8s-ci-robot avatar Aug 06 '24 10:08 k8s-ci-robot