Bug 5322

Summary: Global DNS fallback mechanism not present in poky distro
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Cristian Iorga <cristian.iorga>
Component: connectivityAssignee: Unassigned <unassigned>
Status: ACCEPTED --- QA Contact:
Severity: enhancement    
Priority: Medium+ CC: dvhart, juro.bystricky, lists.volker, meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie, ross.burton, roxana.ciobanu, tgamblin, thomas
Version: 1.6   
Target Milestone: 6.99   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)
Bug Depends on:    
Bug Blocks: 6278    

Description Cristian Iorga 2013-10-07 09:24:38 UTC
Global DNS fallback mechanism not present in poky distro.
In cases were for a specific BSP the network settings are not obtained via DHCP, but through static configuration provisioning, there is no mechanism put in place to configure a global fallback DNS.
Comment 1 Cristian Iorga 2013-10-07 09:31:04 UTC
In case of images with connman present as network manager, for the moment, while a technical solution for global DNS fallback exists,  it is non-functional due to a bug in connman as of version 1.17.
There is a chance that v1.19 or later will fix this.
Comment 2 Cristian Iorga 2013-10-07 09:34:56 UTC
This needs further tracking of connman next releases in order to decide integration milestone.
Comment 3 Cristian Iorga 2013-10-22 13:10:19 UTC
Connman v1.19 has been released and according to release notes, global fallback DNS mechanism has been fixed.
Comment 4 Cristian Iorga 2014-01-13 13:56:29 UTC
Patch sent for review.
Comment 5 Roxana Ciobanu 2014-06-19 11:24:41 UTC
Investigation started
Comment 6 Ross Burton 2016-07-19 16:27:42 UTC
AR taken to remember what happened with Cristi's patch and why it didn't get merged.
Comment 8 Kai Kang 2019-05-21 02:22:02 UTC
(In reply to comment #7)
> The patch is here:
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ciorga/
> YB5322&id=56097ca551d3d752f3472b08bb0bde258e01330b

The branch has been removed. Does this defect still valid? @Cristian
Comment 9 Randy MacLeod 2019-06-06 14:52:26 UTC
Kai, it's still and issue. Can you resend the patch?
Comment 11 Kai Kang 2019-06-28 01:39:45 UTC
It is not needed for systemd. systemd provides /etc/resolv.conf which links to /run/systemd/resolve/resolv.conf contains fall back namespace servers.


nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 1.0.0.1
# Too many DNS servers configured, the following entries may be ignored.
nameserver 8.8.4.4
nameserver 2606:4700:4700::1111
nameserver 2001:4860:4860::8888
nameserver 2606:4700:4700::1001
nameserver 2001:4860:4860::8844
Comment 12 Kai Kang 2019-06-28 07:58:56 UTC
The patch of connman is not needed for sysvinit either. Package connman-conf provides config file /var/lib/connman/wired.config. In the config file, nameserver 8.8.8.8 has been set. 

$ cat /var/lib/connman/wired.config 
[global]
Name = Wired
Description = Wired network configuration

[service_ethernet]
Type = ethernet
IPv4 =
MAC = 52:54:00:12:34:56
Nameservers = 8.8.8.8


@Randy @Richard, I think it is better to install a existing package to image rather than apply a new patch to connman to provide same function. And this patch could be dropped. What's your opinions? Thanks.
Comment 13 Kai Kang 2019-07-01 03:07:22 UTC
(In reply to comment #12)
> The patch of connman is not needed for sysvinit either. Package connman-conf
> provides config file /var/lib/connman/wired.config. In the config file,
> nameserver 8.8.8.8 has been set. 
> 

Oops. connman-conf only patches qemu machines.
Comment 14 Ross Burton 2019-08-08 16:03:50 UTC
For provisioning a global DNS in the general case, both systemd and connman support this now. So if a productised deployment needs a static configuration, that works.

The more specific case which triggered this bug in the first place was an image booted inside a qemu that is using tap networking.  In this case it appears that if networkd is being used then a fallback DNS is already present, so this only really impacts tap-on-sysvinit.

As such I argue that we demote this from high to m+ and see what can be done in the 3.1 cycle.  I have wondered if we should support using dnsmasq to setup a proper networking environment for the guests with working DHCP and DNS proxies.
Comment 15 Ross Burton 2020-02-03 17:29:28 UTC
*** Bug 6278 has been marked as a duplicate of this bug. ***
Comment 16 Randy MacLeod 2023-07-26 21:22:01 UTC
Bulk move of 64 bugs to 4.3 M3 after a quick review.
If a bug is actually fixed, please add a commit link and resolve it.
-- Randy for YP bug team.
Comment 17 Trevor Gamblin 2023-09-14 15:42:25 UTC
Moved to M4.
Comment 18 Trevor Gamblin 2023-09-14 16:00:07 UTC
Mistakenly moved to M4. Since it's an enhancement, it should be 5.0 M1.
Comment 19 Randy MacLeod 2023-12-21 23:28:34 UTC
Bulk move of 52 5.0-M1 bugs to M2.
Comment 20 Randy MacLeod 2024-01-25 14:28:47 UTC
Bulk move of bugs owned by "unassigned" from 5.0-M2 to 5.0-M3.
Comment 21 Thomas Roos 2024-05-02 09:57:57 UTC
@Ross: what do you think is the best solution for this?
I always fix this when using qemu for testing by:
echo "nameserver 8.8.8.8" > /etc/resolv.conf

Which of course I like to get rid of.