Bug 2179916
| Summary: | [RFE] Support static DNS search with dynamic DNS nameserver | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Gris Ge <fge> |
| Component: | nmstate | Assignee: | Gris Ge <fge> |
| Status: | CLOSED ERRATA | QA Contact: | Mingyu Shi <mshi> |
| Severity: | high | Docs Contact: | Jaroslav Klech <jklech> |
| Priority: | unspecified | ||
| Version: | 9.2 | CC: | ferferna, gfialova, jiji, jishi, jklech, network-qe, sfaye, till |
| Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | nmstate-2.2.10-1.el9 | Doc Type: | Enhancement |
| Doc Text: |
.`nmstate` now supports mixing static DNS search along with dynamic DNS name servers
The `nmstate` framework now supports both static Domain Name System (DNS) search domains and dynamic DNS name servers, which `nmstate` obtained from Dynamic Host Configuration Protocol (DHCP) or the `autoconf` mechanism. Previously, static DNS search domains could not co-exist with dynamic DNS name servers because the dynamic configurations were discarded by `nmstate`. This often led to unnecessary complexity and limitations in network setup and management. This enhancement aims to bring more flexibility in managing DNS configurations. As a result, `nmstate` attempts to find a network interface to store the DNS configuration in the following order:
. The preferred interface, which currently holds the DNS configuration and is still valid for DNS
. An automatic interface
. An IP enabled interface
Note that this enhancement does not remove the DNS name servers learned from DHCP.
The following is an example YAML file to apply this feature:
----
---
dns-resolver:
config:
search:
- example.com
- example.org
interfaces:
- name: eth1
type: ethernet
state: up
ipv4:
enabled: true
dhcp: true
ipv6:
enabled: true
dhcp: true
autoconf: true
----
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-11-07 08:24:02 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Gris Ge
2023-03-20 11:49:45 UTC
Patch posted to upstream: https://github.com/nmstate/nmstate/pull/2310 With this patch, nmstate now support static DNS search domains along with dynamic DNS nameserver learn from DHCP/autoconf. For implementation in NM, we try this order to find a interface to store the DNS config: * Desired interface which currently hold DNS config and still valid for DNS. * Auto interface, prefer desired interface. * IP enabled interface, prefer desired interface. We will not use global DNS for this use case as it will suppress DNS nameserver learn from DHCP. Verified with: nmstate-2.2.10-3.el9.x86_64 nispor-1.2.10-1.el9.x86_64 NetworkManager-1.43.8-1.el9.x86_64 DISTRO=RHEL-9.3.0-updates-20230520.44 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (nmstate bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:6323 |