Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Allow user to define static DNS search in a simple apply e.g.:
---
dns-resolver:
config:
search:
- server1
- server2
It would make sense if this is possible only for default route nics with static IP or auto-dns false.
Hi Ales,
With above desire state, nmstate might think you want EMPTY nameserver and only want to search config which seems incorrect to me.
Are you requesting nmstate to set only the dns server and use nameserver from DHCP?
(In reply to Gris Ge from comment #4)
> Hi Ales,
Hi,
>
> With above desire state, nmstate might think you want EMPTY nameserver and
> only want to search config which seems incorrect to me.
It would be better if nmstate could apply only search if nameservers are empty but it depends how
complex it would be to implement.
>
> Are you requesting nmstate to set only the dns server and use nameserver
> from DHCP?
This configuration to me makes sense only for static ip or dhcp with "auto-dns=false".
After check with Ales, confirmed customer is expecting to change DNS server only in desire state with existing DNS nameserver persevered.
To test this feature:
* Applied a state with static DNS setting.
* Apply below state:
---
dns-resolver:
config:
search:
- example.com
- example.org
Hi Gris,
I understand I can change `search` and don't touch `server`.
But if there is **NO ANY** configured dns server, I cannot configure `search` alone, it that right? For example:
# there is nothing in dns-resolver.config in the beginning:
[17:01:45@dell-per740-80 ~/repo-nmstate/libnmstate]0# nmstatectl show | head -10
---
dns-resolver:
config: {}
running:
search:
- rhts.eng.pek2.redhat.com
server:
- 10.73.2.107
- 10.73.2.108
- 10.66.127.10
# then I try adding `search` WITHOUT `server`
echo "
dns-resolver:
config:
search:
- usersys.redhat.com
routes:
config:
- destination: 0.0.0.0/0
metric: 1000
next-hop-address: 192.168.199.254
next-hop-interface: veth0
table-id: 199
interfaces:
- name: veth0
type: veth
state: up
ipv4:
enabled: true
address:
- ip: 192.168.199.1
prefix-length: 24
veth:
peer: veth0_ep
" | nmstatectl apply -
it fails.
(In reply to Mingyu Shi from comment #9)
> Hi Gris,
>
> I understand I can change `search` and don't touch `server`.
> But if there is **NO ANY** configured dns server, I cannot configure
> `search` alone, it that right? For example:
>
> # there is nothing in dns-resolver.config in the beginning:
> [17:01:45@dell-per740-80 ~/repo-nmstate/libnmstate]0# nmstatectl show | head
> -10
> ---
> dns-resolver:
> config: {}
> running:
> search:
> - rhts.eng.pek2.redhat.com
> server:
> - 10.73.2.107
> - 10.73.2.108
> - 10.66.127.10
>
> # then I try adding `search` WITHOUT `server`
> echo "
> dns-resolver:
> config:
> search:
> - usersys.redhat.com
> routes:
> config:
> - destination: 0.0.0.0/0
> metric: 1000
> next-hop-address: 192.168.199.254
> next-hop-interface: veth0
> table-id: 199
> interfaces:
> - name: veth0
> type: veth
> state: up
> ipv4:
> enabled: true
> address:
> - ip: 192.168.199.1
> prefix-length: 24
> veth:
> peer: veth0_ep
> " | nmstatectl apply -
>
> it fails.
Discussed with Fernando, let me retell:
the current situation meets the tile "change DNS search only and preserving existing DNS nameservers" (the `servers` exists).
The current problem is that I cannot add `search` when there is NO any `servers`.
I'm marking the current bug as verified and opening a new BZ for tracking the issue
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/RHEA-2022:1772
Description of problem: Allow user to define static DNS search in a simple apply e.g.: --- dns-resolver: config: search: - server1 - server2 It would make sense if this is possible only for default route nics with static IP or auto-dns false.