On my RPi running Ubuntu 16.04.2 LTS, my findings were as follows:
Note: I uninstalled NetworkManager and just left resolvconf to do its stuff. (This is a fixed server so things don't change much network wise.)
IF I had the dns-search and dns-nameserver lines on only ONE interface (the primary, wired one) but not the other (wlan0) then on reboot, about 95% of the time my /etc/resolv.conf file would be empty.
e.g. When my interfaces file looked like this:
# The primary network interface
auto enxb827ebbfedcf
iface enxb827ebbfedcf inet static
address 192.168.1.16
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-search summer.co.uk summer.vpn
dns-nameserver 192.168.1.16
dns-nameserver 192.168.1.1
# end stanza with clear line+
# The loopback network interface
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 192.168.1.17
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
THEN after a reboot my resolv.conf would look like this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
However, on one or two reboots I noticed that it DID have what I wanted, e.g.
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.16
nameserver 192.168.1.1
search summer.co.uk summer.vpn
Solution
When I gave BOTH interfaces (wired and wlan0) the dns-search and dns-nameserver lines, it all worked fine on every reboot (so far anyway)
i.e. the following interfaces file works for me:
# The primary network interface
auto enxb827ebbfedcf
iface enxb827ebbfedcf inet static
address 192.168.1.16
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-search summer.co.uk summer.vpn
dns-nameserver 192.168.1.16
dns-nameserver 192.168.1.1
# end stanza with clear line+
# The loopback network interface
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 192.168.1.17
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-search summer.co.uk summer.vpn
dns-nameserver 192.168.1.16
dns-nameserver 192.168.1.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
and gives me the following correct resolv.conf after every reboot (so far)
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.16
nameserver 192.168.1.1
search summer.co.uk summer.vpn
I assume this duplicate config is normal, if somewhat redundant.
Conclusion: If an interface (other than lo0) lacks dns-search and dns-nameserver information, then resolvconf puts nothing in your resolv.conf file. (It's as if ifup did the wlan0 interface second and ifup wiped resolv.conf or such like.)
I'm not sure if this is a bug or not, feels wrong to me though.