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

[202205] Clear /etc/resolv.conf after changing the mgmt interface configuration to static. #13514

Closed
wants to merge 1 commit into from

Conversation

oleksandrivantsiv
Copy link
Collaborator

Why I did it

fixes #12907

When the management interface IP address configuration changes from dynamic to static the DNS configuration (retrieved from the DHCP server) in /etc/resolv.conf remains uncleared. This leads to a DNS configuration pointing to the wrong nameserver.

How I did it

Use resolvconf package for managing DNS configuration. It is capable of tracking the source of DNS configuration and puts the configuration retrieved from the DHCP servers into a separate file. This allows implementation cleanup of DNS configuration retrieved from DHCP.

How to verify it

  1. Ensure that the management interface has no static configuration.
  2. Check that /etc/resolv.conf has DNS configuration.
  3. Configure a static IP address on the management interface.
  4. Verify that /etc/resolv.conf has no DNS configuration.
  5. Remove the static IP address from the management interface.
  6. Verify that /etc/resolv.conf has DNS configuration retrieved form DHCP server.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant