-
Notifications
You must be signed in to change notification settings - Fork 243
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
preflight-linux: Add logic to check if /etc/resolv.conf managed by systemd-resolved #4143
Conversation
/hold This uses go-1.21 functionality to check if a item present in slice it should go after #4139 one. |
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.
but the
/etc/resolv.conf
is not managed by it this dispatcher file is not going to use for dns resolution and user failed to start the cluster.
Not so sure about this, my feeling would be that the dispatcher is called when the NM interface changes state, but then the resolvectl
call it contains has no effect on DNS resolution as systemd-resolved does not manage /etc/resolv.conf?
Yes dispatcher is called and even command is executed but since the |
Can this be clarified in the commit log? |
Updated. |
/unhold |
…stemd-resolved Current logic checks if systemd-resolved service is running and add the dispatcher file to network manager config which uses `systemd-resolve` to update the domain and dns for `crc` interface. But it is observed that the dispatcher is called when the NM interface changes state, but then the resolvectl call it contains has no effect on DNS resolution as systemd-resolved does not manage /etc/resolv.conf. This PR add logic to check if `/etc/resolv.conf` actually managed by systemd-resolved and if not then use `dnsmasq` configuration which works as expected.
@praveenkumar: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau 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 |
Current logic checks if systemd-resolved service is running and add the dispatcher file to network manager config which uses
systemd-resolve
to update the domain and dns forcrc
interface. But it is observed for systems which have systemd-resolved service enabled and running but the/etc/resolv.conf
is not managed by it this dispatcher file is not going to use for dns resolution and user failed to start the cluster.This PR add logic to check if
/etc/resolv.conf
actually managed by systemd-resolved and if not then usednsmasq
configuration which works as expected.Fixes: Issue #4110