eve
eve copied to clipboard
Container-in-VM: put DNS servers from all ports to resolv.conf
When container application has multiple network interfaces, it should be configured to failover between DNS servers collected from all interfaces.
The current behaviour is that we only put DNS servers from the first (eth0) interface into resolv.conf. However, if the uplink port corresponding to the first app interface looses connectivity, name resolution will stop working and app will not try DNS servers from other interfaces (that could be potentially using different uplinks). However, there is nothing in EVE API that would declare the first app interface as being special and exclusively used for DNS.
Comparing this to Linux or Windows (i.e. VM apps), the default behaviour of the resolver is to iterate over all ports and try every DNS server until one responds. We should therefore replicate the same behaviour in our shim VM created for container applications.