[Pkg-utopia-maintainers] Bug#973701: network-manager: systemctl restart ModemManager.service wipes /etc/resolve.conf (almost) clean

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Wed Nov 4 14:02:14 GMT 2020


On Tue, 3 Nov 2020, Michael Biebl wrote:
>
> Anything which would make this bug report more more useful. Leave
> out any snide remarks and stupid comments if you can.

Alright, one stupid thing is the subject line.  Should be:

	# systemctl restart NetworkManager.service

instead (cut/paste error).

That empties the contents of:

	/etc/resolv.conf -> /run/NetworkManager/resolv.conf

I can reliably reproduce that.

More info:

This is a laptop and I'm using its wireless network interface,
configured to use dhcp to get the parameters from my home router.

The primary dns is the router itself, 192.168.0.1.  Besides, I locally
configured an additional (secondary) dns 9.9.9.9.  `nmcli' confirms
that:

	# nmcli
	...
	DNS configuration:
		servers: 192.168.0.1 9.9.9.9
		interface: wlo1

Still, /etc/resolv.conf is emptied after a service restart.

Looking at the journal, I see:

	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4987] dhcp4 (wlo1): option dhcp_lease_time      => '4294967295'
-->	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4987] dhcp4 (wlo1): option domain_name_servers  => '192.168.0.1 192.168.0.1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4988] dhcp4 (wlo1): option host_name            => 'debian'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4988] dhcp4 (wlo1): option ip_address           => '192.168.0.2'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4988] dhcp4 (wlo1): option next_server          => '192.168.0.1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4989] dhcp4 (wlo1): option requested_broadcast_address => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4989] dhcp4 (wlo1): option requested_domain_name => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4989] dhcp4 (wlo1): option requested_domain_name_servers => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4989] dhcp4 (wlo1): option requested_domain_search => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4990] dhcp4 (wlo1): option requested_host_name  => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4990] dhcp4 (wlo1): option requested_interface_mtu => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4990] dhcp4 (wlo1): option requested_ms_classless_static_routes => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4991] dhcp4 (wlo1): option requested_nis_domain => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4991] dhcp4 (wlo1): option requested_nis_servers => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4991] dhcp4 (wlo1): option requested_ntp_servers => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4991] dhcp4 (wlo1): option requested_rfc3442_classless_static_routes => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4992] dhcp4 (wlo1): option requested_root_path  => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4992] dhcp4 (wlo1): option requested_routers    => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4992] dhcp4 (wlo1): option requested_static_routes => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4992] dhcp4 (wlo1): option requested_subnet_mask => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4993] dhcp4 (wlo1): option requested_time_offset => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4993] dhcp4 (wlo1): option requested_wpad       => '1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4993] dhcp4 (wlo1): option routers              => '192.168.0.1'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4993] dhcp4 (wlo1): option subnet_mask          => '255.255.255.0'
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.4994] dhcp4 (wlo1): state changed unknown -> bound
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.5042] device (wlo1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.5101] device (wlo1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.5111] device (wlo1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.5129] manager: NetworkManager state is now CONNECTED_LOCAL
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.5207] manager: NetworkManager state is now CONNECTED_SITE
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.5213] policy: set 'accesspoint' (wlo1) as default for IPv4 routing and DNS
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.5234] device (wlo1): Activation: successful, device activated.
	Nov 04 09:47:04 debian dbus-daemon[1092]: [system] Activating via systemd: service name='org.freedesktop.resolve1' unit='dbus-org.freedesktop.resolve1.service' requested by ':1.57' (uid=0 pid=2085 comm="/usr/sbin/NetworkManager --no-daemon ")
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.5259] manager: NetworkManager state is now CONNECTED_GLOBAL
-->	Nov 04 09:47:04 debian dbus-daemon[1092]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.resolve1.service': Unit dbus-org.freedesktop.resolve1.service not found.
	Nov 04 09:47:04 debian NetworkManager[2085]: <info>  [1604479624.6271] manager: startup complete

in both cases, at boot and at service restart.  Note the duplicated ip:

	option domain_name_servers  => '192.168.0.1 192.168.0.1'

and the error:

	Unit dbus-org.freedesktop.resolve1.service not found

Something goes wrong while rewritting /run/NetworkManager/resolv.conf.


--
Cristian



More information about the Pkg-utopia-maintainers mailing list