bug: blueos cannot resolve mdns addresses
Bug description
From within the blueos-core image, you cannot resolve hosts published via MDNS.
Additionally, MDNS does not participate in host resolution since blueos-core has a separate /etc/nsswitch.conf from the host OS.
Steps to reproduce
SSH into BlueOS
$ sudo apt install avahi-utils
$ avahi-browse -at
This will show all hosts on the local network.
$ docker exec -it blueos-core apt install avahi-utils
$ docker exec -it blueos-core avahi-browse -at
This will show "Failed to create client object: Daemon not running".
Primary pain point(s)
In SonarView, we assume that window.location is the domain name that expresses the current blueos instance.
This is okay if you use http://blueos but NOT okay if you use http://blueos.local. Note that I expect additional changes will likely have to be made within extensions to make this work.
Additional context
Originally discovered here: https://discuss.bluerobotics.com/t/ping-1d-and-cockpit-standalone-version/17977/7?u=o.o
I cannot ping either blueos-avahi.local. (advertised by avahi-daemon, outside Docker) nor blueos-dan-eth0-1.local. (advertised by Beacon service, from within blueos-core). I can ping both from outside docker.
This should be done with an eye toward how extensions should access local services: https://github.com/bluerobotics/BlueOS/issues/2869
Prerequisites
- [X] I have checked to make sure that a similar request has not already been filed or fixed.
~~Maybe it's sufficient to mount /var/run/avahi-daemon and /etc/nsswitch.conf from the host OS?~~
Guess not.