Bug 1822141 - auto-dns can be set to true when configured static DNS
Summary: auto-dns can be set to true when configured static DNS
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-08 11:07 UTC by Mingyu Shi
Modified: 2020-06-17 07:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-17 07:11:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer.log (5.29 KB, text/plain)
2020-04-08 11:07 UTC, Mingyu Shi
no flags Details

Description Mingyu Shi 2020-04-08 11:07:18 UTC
Created attachment 1677206 [details]
reproducer.log

Description of problem:
When apply following 'dns.yaml'(no explicitly set on auto-dns), it will success and return state as auto-dns=true and it is actually running the DNS from DHCP. But if you do 'nmstatectl edit veth0' to edit any DNS config and apply, it will fail.
This make no sense that auto-dns can be reported but cannot configured, user may get two opposite states from nmstate, 
BTW, I think auto-dns with static DNS may be good as the static DNS can be a backup of auto DNS,

Version-Release number of selected component (if applicable):
nmstate-0.2.6-6.el8.noarch
NetworkManager-1.22.8-4.el8.x86_64
DISTRO=RHEL-8.2.0-20200404.0
Linux hp-dl388g8-04.rhts.eng.pek2.redhat.com 4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:
100%

Steps to Reproduce:
# dns.yaml
---
dns-resolver:
  config:
    search:
    - veth0.lan
    - veth0.lan0
    server:
    - 10.68.5.26
    - 10.72.17.5
interfaces:
- name: veth0
  type: ethernet
  state: up
  ipv4:
    enabled: true
    dhcp: true

1. ip link add veth0 type veth peer name veth0_ep
   ip link set veth0 up
   nmcli dev set veth0 managed yes
2. nmstatectl set dns.yaml
3. nmstatectl show veth0   # auto-dns=true
4. nmstatectl edit veth0   # edit any of DNS config, apply, fails

Actual results:


Expected results:
We may have two solutions:
1. Automatically set auto-dns to false when user configured static DNS and cannot be changed
2. Support static DNS with auto-dns=true
If possible and no side effect, I prefer the 2nd.

Additional info:

Comment 1 Gris Ge 2020-06-17 07:11:23 UTC
User need to explicitly set `auto-dns: False` when trying to edit static DNS entry with DHCP/Autoconf enabled.


For supporting static DNS with DHCP/Autoconf and `auto-dns: True`, there is no real use case yet.
Let's reopen this once any layer products need this.


Note You need to log in before you can comment on or make changes to this bug.