Jump to content

classic networking stopped working after network-manager update


Recommended Posts

Posted

Dear all,

I'm running Armbian 21.02.1 on the nanopi neo3 (diagnostic: http://ix.io/3y5D) using /etc/network/interfaces and have network-manager disabled (`sudo systemctl disable network-manager.service` ). I occasionally use network-manager for a usb-wifi stick.

When I recently upgraded the packages it triggered a network-manager update. After a reboot the nanopi was not able to start is networking, it only got a 169.254.6.233 address. After analyzing the situation the network-manager update apparently removed the softlink `/etc/resolv.conf ->  /run/resolvconf/resolv.conf` and replaced it with a text file. Can network-manager be changed somehow, so that it keeps using the softlink instead of its own interpretation of /etc/resolv.conf?

 

Kind regards,

Dennis

Posted

Hi Ianefu,
Thanks for the pointer. It appears that rc-manager in `/etc/NetworkManager/NetworkManager.conf` is currently set to file, it probably needs to be set to something else to respect the softlink in /etc/resolv.conf. From the networkmanager.conf manpage :
 

	rc-manager
		Set the resolv.conf management mode. The default value depends on NetworkManager build options, and this version of NetworkManager was build with a default of "resolvconf". 
		Regardless of this setting, NetworkManager will always write resolv.conf to its runtime state directory /run/NetworkManager/resolv.conf.


From the description of the different options, it looks like it can be set to `symlink` or `resolvconf` to improve its behaviour, even `file` should not replace existing links... unless there is something in the network-manager debian package that does this...

 

Kind regards,

Dennis

Posted

If you know you're only using ifupdown, and never NetworkManager, you can always just disable it?

 

sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager

 

Posted

Hi tparys,

Yes, that is exactly my point. I had NetworkManager stopped and disabled, and during an apt update && apt upgrade, the linked /etc/resolv.conf was turned into a NetworkManager managed textfile, rendering 2 nanopi neo3's unreachable after reboot. I had to use debug-uart to repair the softlink.

Kind regards,

Dennis

Posted

Interesting. Doing some more digging into the debian postinst scripts. May be useful for you in the future if this becomes a continuing issue.

 

The resolvconf package touches this file after installation (/var/lib/dpkg/info/resolvconf.postinst), but only once (tracked via a file you can pre-place, and disable any action on its part).

 

# Linkify /etc/resolv.conf if appropriate
if [ ! -e /var/lib/resolvconf/linkified ] ; then

... <snip> ...
  
    ln -nsf ../run/resolvconf/resolv.conf /etc/resolv.conf
    # Make a record that we have created it
    :> /var/lib/resolvconf/linkified
fi

 

Looks like network-manager does too (/var/lib/dpkg/info/network-manager.postinst), but only if it's already a link.

 

SystemD appears to poke this file on a fresh installation (/var/lib/dpkg/info/systemd.postinst), but not on upgrade.

 

Might be useful to find out what /etc/resolv.conf is pointing to, and look for that pattern in /var/lib/dpkg/info? Might tell you which package is tripped you up, and how to prevent it from doing that in the future?

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines