-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fix host DNS settings being edited too soon, and not working with NetworkManager #8575
Conversation
Hi @mac-chaffee. 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 Once the patch is verified, the new status will be reflected by the 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. |
nameserverentries: | ||
nameserver {{ ( ( [nodelocaldns_ip] if enable_nodelocaldns else []) + coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([]) + configured_nameservers|d([])) | unique | join(',nameserver ') }} | ||
nameserverentries: |- | ||
{{ ( ( [nodelocaldns_ip] if enable_nodelocaldns else []) + coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([]) + configured_nameservers|d([])) | unique | join(',') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change allows us to specify this complex list of nameservers one time, then re-use the value in both the raw /etc/resolv.conf task and the NetworkManager task.
This looks great @mac-chaffee, thanks taking case of this. /ok-to-test |
I'd like to run a manual test for at least scale.yml and maybe other plays (unless CI tests those) since those plays cover some extra branches of this code. /hold |
Great idea. It would be good to add this scenario in the CI. We cover upgrades and broken node replacement and there is some incipient ha-scale support but no ci test covering it. |
gather_facts: False | ||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" | ||
environment: "{{ proxy_disable_env }}" | ||
roles: | ||
- { role: kubespray-defaults } | ||
- { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf } | ||
- { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_late: true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the extra dns_late: true
here to match cluster.yml and the others since this setting allows you to skip much of the preinstall role that doesn't involve updating resolv.conf.
Glad I checked! I had to add @onock's code to the end of scale.yml so that the DNS settings are fully applied at the end of the play. EDIT: nevermind, not true, that code was there already and I just missed it because I was testing on release-2.18. I also added some comments to help the next poor soul who might have to debug this again :) |
/unhold |
Signed-off-by: Mac Chaffee <[email protected]>
Nice work to support NetManager systems which are not FCOS also. /lgtm |
Thanks for this @mac-chaffee ! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cristicalin, mac-chaffee 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 |
Registering the error here more as a reminder than a "you have to fix" but since this PR the nightly fedora job is failing |
Dang, I'm away right now but I'll be back on Monday to give it a proper look. |
…NM (kubernetes-sigs#8575) Signed-off-by: Mac Chaffee <[email protected]>
…NM (kubernetes-sigs#8575) Signed-off-by: Mac Chaffee <[email protected]>
@mac-chaffee have you been able to take a look at this, as referenced above? thanks |
@vielmetti I haven't been able to reproduce that issue. Since I can't trigger the CI to run again or tweak the log level or SSH into the host, I'm a little stuck on what to do unfortunately :( I've been using a version of kubespray which includes this change for two upgrades so far with no issue (on RHEL), so it might be a Fedora-specific issue. |
…NM (kubernetes-sigs#8575) Signed-off-by: Mac Chaffee <[email protected]>
…NM (kubernetes-sigs#8575) Signed-off-by: Mac Chaffee <[email protected]>
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR fixes two bugs:
Which issue(s) this PR fixes:
Fixes #8560 for hosts other than those using systemd-resolved.
Special notes for your reviewer:
This PR relies on PR #8561 (specifically that line in reset.yml) to fully fix issue #8560 in all environments. But merge order shouldn't matter.
Does this PR introduce a user-facing change?: