Bug 1160667

Summary: [RFE] Allow explicit dns configuration
Product: [oVirt] ovirt-engine Reporter: Antoni Segura Puimedon <asegurap>
Component: RFEsAssignee: Martin Mucha <mmucha>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: adevolder, apinnick, bazulay, bugs, bzrh.bobd, danken, fgarciad, lsurette, mburman, mgoldboi, mmucha, myakove, oramraz, rbalakri, sbonazzo, s.kieske, srevivo, stirabos, ykaul, ylavi
Target Milestone: ovirt-4.2.0Keywords: FutureFeature
Target Release: 4.2.0Flags: rule-engine: ovirt-4.2+
mburman: testing_plan_complete+
ylavi: planning_ack+
danken: devel_ack+
myakove: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
The engine now supports explicit DNS configuration.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:05:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1451245, 1451261, 1451313    
Bug Blocks: 1160423    

Description Antoni Segura Puimedon 2014-11-05 10:57:40 UTC
Description of problem:
Currently, for setting DNS configuration on static IP networks, we rely on:
 - 'cfg' field for reporting.
 - Legacy Ifcfg option passthrough in SetupNetworks with a blacklist of what
   can and what can't be passed through.

The problem with the above approach is that it just can't work with other
configurators without hooks and hacks. In order to address this, we should:

- Read /etc/resolv.conf and report the dns configuration on the networks that
  have defaultRoute=True
- Accept a dns attribute to setupNetworks network definition API that takes a
  possibly empty list of addresses where one can find the dns servers. This
  would then be processed differently by configurators:
     + ifcfg: Would just have it added to the top device of the network as:
              DNS<NUM_OF_ELEMENT> for each element in the 'dns' list.
     + others: Would just write each element to /etc/resolv.conf

Steps to verify:
1. setupNetworks({'ovirtmgmt': {'nic': 'eth1', 'addr': '192.168.11.3', 'defaultRoute': True, 'netmask': '255.255.255.0', 'gateway': '192.168.1.1', 'dns': ['10.10.10.10', '10.10.10.11'], 'bridged': True}}, {}, {'connectivityCheck': False})
2. cat /etc/resolv.conf
3. getVdsCapabilities and check that the ovirtmgmt network reports dns servers
   as a list like: ['10.10.10.10', '10.10.10.11'].

Comment 2 Bob Doolittle 2015-03-11 17:41:59 UTC
I believe this bug should be pursued with high priority, since the most typical server configuration is with static addressing.

Thus, this bug affects the majority of ovirt installations, resulting in a fatal error for hosted-engine-setup which is difficult to recover from.

This should be considered a serious bug, rather than a low priority feature.

A fix should be provided in the earliest possible release of 3.5.1.

Comment 3 Bob Doolittle 2015-03-11 17:44:24 UTC
Previous note should have read "3.5.x"

Comment 4 Bob Doolittle 2015-03-11 17:44:47 UTC
Previous note should have read "3.5.x"

Comment 5 Barak 2015-06-11 11:48:47 UTC
It did not make it to 3.6, moving to 4.0.
as this is an API it may be a bit more than described above especially since cluster levels are now involved (with the API changes)

Comment 7 Dan Kenigsberg 2016-08-24 08:48:20 UTC
Vdsm side has been merged to 4.0 branch. Engine side still needs design.

Comment 8 Sandro Bonazzola 2016-10-05 12:31:28 UTC
Any update on this?

Comment 9 Martin Mucha 2016-10-05 15:25:26 UTC
please read:
https://github.com/oVirt/ovirt-site/pull/456

feature page is not approved/merged yet, but REST details are present and probably (.9) final. IIUC that's what you need most, right?

Comment 10 Yaniv Kaul 2017-06-18 14:08:18 UTC
Dan, any reason it cannot be in 4.2?

Comment 11 Dan Kenigsberg 2017-06-19 06:47:23 UTC
Moving back to 4.2, as the feature is already in final bug-fixing phase.

Comment 12 Dan Kenigsberg 2017-09-20 22:33:11 UTC
According to bug 1451261, setting DNS with DHCP most often ends with host out-of-sync. This can be mitigated by refreshing caps.

Except this bug, I believe the feature has been implemented.

Comment 13 Michael Burman 2017-09-24 08:49:05 UTC
This should be part of the known issues for the DNS feature. 
In case of setting DNS with DHCP, most of the times ends with host out-of-sync and additional manual refresh caps is needed by the user/admin.

Verified on -  4.2.0-0.0.master.20170921184504.gitfcfc9a7.el7.centos

Comment 14 Sandro Bonazzola 2017-12-20 11:05:09 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Comment 15 Dan Kenigsberg 2018-04-01 13:16:18 UTC
*** Bug 1534290 has been marked as a duplicate of this bug. ***