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.

Bug 1822141

Summary: auto-dns can be set to true when configured static DNS
Product: Red Hat Enterprise Linux 8 Reporter: Mingyu Shi <mshi>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED WONTFIX QA Contact: Mingyu Shi <mshi>
Severity: low Docs Contact:
Priority: low    
Version: 8.2CC: ferferna, jiji, jishi, network-qe, till
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-17 07:11:23 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:
Attachments:
Description Flags
reproducer.log none

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.