[CentOS] disable/mask NetworkManager leads to unit startup fails

Oberdorfer Patrick

patrick.oberdorfer at a1telekom.at
Mon Jan 16 15:24:03 UTC 2017


Hello!

 

For me it was best practice to disable "NetworkManager" on headless
installations.

Now suddenly I ran into an problem with several programs not starting
correctly upon boot anymore. 

The problem seems to be that their unit files contain "After=network.target"
but network.target wont wait till network is up and working, just waits for
some low level network stuff.

 

Now I read that it would be good practice to edit this and use
"After=network-online.target" instead. But I don't want to touch several
systemd unit files shipped via rpm packages. 

 

Software like unbound, postfix and so on which needs to bind to ip+port on
startup fails on my systems now since I disabled NetworkManager.

 

What solved the problem for me was to install "systemd-networkd" instead and
enable it upon boot.

It's system unit file pulls in "network.target" as "Wants" this way software
that says "After=network.target" will start after network cards are
configured. Why there is this behavior I haven't found out yet. 

 

Whats your best practice to archieve stable networking upon reboot? Do you
use NetworkManager or systemd-networkd or maybe something exotic anyway?

 

PS: I have already filed an Bugzilla report here:
https://bugzilla.redhat.com/show_bug.cgi?id=1412570

 

Thanks! 




More information about the CentOS mailing list