C8 And NetworkManager Problem

Home » CentOS » C8 And NetworkManager Problem
CentOS 11 Comments

Hi list,

I’ve installed C8 on my workstation. I configured my network devices
(two bridges, two nics) using nmcli. Now that NM is the default I tried it. On C7 I always disabled it.

I noticed some problem:

1) During the boot, also if NetworkManager-wait-online.service status is OK, I noticed that opening a terminal and ping some address it needs some time to perform ping and any operation on a network connection. So seems that in the first 30sec/1min there isn’t an available network connection. After this time if I run a ping or whatever network is available.

2) Due to the problem 1, It cannot mount samba shares on boot saying
“Not suitable address found”. After the network is available I can mount samba shares.

3) I noticed that with NetworkManager a bridge must have an address. If I don’t specify an address for the bridge, NM will try to assign some address, enable the connection

11 thoughts on - C8 And NetworkManager Problem

  • For the .mount units, you could make them run after the network-waits-online service, thus making sure that they only mount after a stable network is up. Adding _netdev to the fstab mount options also does that, I think. The best solution I’ve found for this issue is to use .automount units for every network .mount unit. It will only mount the volume when it’s actually read or written to, which might be well after the boot, and uncounted it after inactivity. It prevents stale mounts if the file server reboots or dies too.


    Jonathan Billings

  • Once upon a time, Alessandro Baggi said:

    Do you have the device configured to not configure IP? From the CLI, do “nmcli con mod ipv4.method disabled ipv6.method ignore”.

  • Il 20/11/19 14:46, Chris Adams ha scritto:
    I have only configured br1 to have a manual method for ipv4.address. This is different from having method disabled?

  • I don’t know C8 or smbmount but on C7 with nfs, I had to add this to the fstab options to make it works as expected:

    x-systemd.requires=network-online.target

    Maybe something similar is needed in your situation.

    Regards, Simon

  • –fstab is no longer parsed directly by the mount command at boot time. Since C7, when systemd was introduced, it’s now parsed by systemd to create unit files. It’s a transition mechanism. I recommend converting all the mounts not created by the installer to permanent real unit files so you can use all the power of unit syntax. (How does systemd know the difference between generated files and hand-crafted ones? Can one just remove the fstab entry once the generated one is present? That would make migration easier.)

    Read up on what systemd does with fstab:

    <https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html>

  • Mount units created by the systemd generator are dynamically created each boot. You can create a persistent one in /etc/systemd/system to override the dynamic one from fstab.

  • –Where does it put the dynamic ones? I’ve never gone down that rabbit hole…

    Ok, I braved the rabbit hole and found it puts them in a subdirectory of
    /run/systemd, a volatile filesystem recreated at boot time. So one could copy the generated file to /etc/systemd/system which has higher priority than the generated files and thereby make them permanent. One then removes the fstab entry.

    <https://www.freedesktop.org/software/systemd/man/systemd.generator.html>

    My sense is that static, simple mounts for which drivers are present at boot time are best placed in fstab, and more complex dynamic mounts like network mounts are best placed in units.