Bug 7060 - nmbd does not start if no network interfaces up
nmbd does not start if no network interfaces up
Status: NEW
Product: Samba 3.4
Classification: Unclassified
Component: Nmbd
3.4.2
Other Linux
: P3 normal
: ---
Assigned To: Jeremy Allison
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-25 12:50 UTC by Orion Poplawski
Modified: 2017-10-30 13:41 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Orion Poplawski 2010-01-25 12:50:33 UTC
Current linux distros (Fedora 12 for e.g.) can start nmbd before the network interfaces are configured.  Currently, nmbd will exit if no interfaces are configured.  It would be very helpful if it stayed up and added/removed interfaces as they became available.
Comment 1 Andreas Hasenack 2017-10-30 13:41:19 UTC
I believe this is fixed already, at least in samba4.

nmbd actually starts as usual, detects there is no network, and waits for the network *forever*: there is no timeout. Its loop is essentially this:
    while (iface_count_v4_nl() == 0) {
        sleep(5);
        load_interfaces();
    }

That's when it logs the message "No local IPv4 non-loopback interfaces available, waiting for interface...". It really waits forever.

What is happening nowadays, though, is that systemd is waiting for an sd_notify() from nmbd, and if that doesn't come in time, systemd will kill nmbd (!). You end up with a system where smbd is running, but nmbd was killed unnecessarily.