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

After moving host interface to the secondary OVS bridge the host lost DNS config #6558

Open
jianjuns opened this issue Jul 26, 2024 · 5 comments
Assignees
Labels
area/interface Issues or PRs related to network interfaces kind/bug Categorizes issue or PR as related to a bug.

Comments

@jianjuns
Copy link
Contributor

jianjuns commented Jul 26, 2024

Describe the bug
In a secondary network test by @meibensteiner, after the node's primary interface is moved to the secondary OVS bridge, the node lost its DNS config in /etc/resolv.conf.

cat /etc/resolv.conf
# Generated by NetworkManager 

It may be an interoperability issue with NetworkManager.

To Reproduce

  • cloud-init with the most straight forward settings for formatting and networking
  • networking via ipv4 DHCP, no proxy or anything alike
  • Basic RKE2 without CNI
  • Install Antrea (configured node's primary interface for secondary network OVS bridge)

Versions:
It happened in cluster with both Ubuntu 24.04 and Debian 12 nodes.

@jianjuns jianjuns added kind/bug Categorizes issue or PR as related to a bug. area/interface Issues or PRs related to network interfaces labels Jul 26, 2024
@jianjuns jianjuns changed the title After moving host interface to the secondary OVS bridge the host loses DNS config After moving host interface to the secondary OVS bridge the host lost DNS config Jul 26, 2024
@jianjuns jianjuns added this to the Antrea v2.2 release milestone Jul 31, 2024
@meibensteiner
Copy link

This issue is probably caused by systemd-resolved. Adding a static dns server in /etc/systemd/resolved.conf fixes it.

[Resolve]
DNS=192.168.1.254

@luolanzone
Copy link
Contributor

Hi @meibensteiner , thanks for the update, systemd-resolved will update /etc/resolv.conf whenever there is a change in network configuration, DNS settings, or when the service is restarted or reloaded. You can try to run chattr +i /etc/resolv.conf command to make the file immutable to avoid the file being modified again.

@jianjuns Looks like the issue is not directly with Antrea secondary network feature but systemd-resolved, considering there are several processes can modify the file, I feel it may not be easy to check from Antrea side, any suggestion for next step?

@jianjuns
Copy link
Contributor Author

But do we know why systemd removed the DNS config? We need to understand if that is because of OVS (e.g. systemd/network manager do not recognize interfaces on the OVS even we keep the original host interface names).

@luolanzone
Copy link
Contributor

Sure, I can check if this can be reproduced locally first.

@luolanzone
Copy link
Contributor

No chance to take a look at this recently, assigning this to @hongliangl to move forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/interface Issues or PRs related to network interfaces kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants