Hi Mietal, can you please take this one on you? the original report was done by Vladimir in BZ 1536397
Hi Vladimir, Please note the following points: 1. the guest os must contain an updated version of cloud-init. I would say at least 0.7.9-21, in order for cloud-init to process the dns configuration according to the openstack recommendations which is what RHEV is also bound to. So run the vm without dns config, yum update cloud-init, and then test. 2. according to what i was able to find in cloud-init docs + source code and according to my own tests: a. DNS nameservers (up to three are supported by cloud-init) and search domains (up to 6) will be added to the ifcfg file of the network and /etc/resolv.conf if the network is static (i.e. is configured with static IP). b.DNS nameservers (up to 3 supported by cloud-init) will be applied directly to /etc/resolv.conf, in case no networks are specified or all networks are configured with dhcp. If the vm is restarted, existing entries in /etc/resolv.conf are reapplied first, and newer ones are appended only if there are less than 3. If nameservers are specified, cloud-init will drop a file in /etc/NetworkManager/conf.d telling it to not manage dns so that nameserver configuration from dhcp won't overwrite what's been written to /etc/resolv.conf by cloud-init. 3. Cloud-init writes the search domain key and value to ifcfg, so the key name is not a RHEV decision. AFAIK, DOMAIN is the correct key for a search domain in ifcfg.
And what if I specify dns search domain without interface configuration? Right now it doesn't get anywhere, if I'm correct
According to Ryan's explanation in https://bugzilla.redhat.com/show_bug.cgi?id=1489270#c17 this looks like a valid outcome because he says cloud-init treats all non-interface-specific entries as nameserver entries.
This is misleading for users then, since you can specify dns search in the initial run -> dns section, but it won't get anywhere if you don't have iface configured. Can we move it to the iface section and document it then?
Verified on 4.2.3.5-0.1.el7 Dns search parameter is passed correctly now. Tested following configurations: IPv4 static IPv6 static IPv4 static + IPv6 static IPv4 dhcp + IPv6 dhcp IPv4 static + IPv6 dhcp IPv4 dhcp + IPv6 static In all configurations dns search parameter is passed to the cloud-init correctly
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.3 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.