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:
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.