Our unit files don't seem to specify that we need the network to be operational. Apparently systemd is really verbose about this, but it's an easy fix.
+++ This bug was initially created as a clone of Bug #1496307 +++
--- Additional comment from on 2017-09-27 00:20:50 EDT ---
Systemctl status samba shows the following as well:
feddc samba[658]: task_server_terminate: [KDC: no network interfaces configured]
It seems to correspond to samba/source4/kdc/kdc-service-mit.c
/* Load interfaces for kpasswd */
load_interface_list(task, task->lp_ctx, &ifaces);
if (iface_list_count(ifaces) == 0) {
task_server_terminate(task,
"KDC: no network interfaces configured",
false);
return;
}
But I have no skills to fix it
--- Additional comment from Andreas Schneider on 2017-12-11 09:19:14 EST ---
Could you please test with the following change:
--- a/packaging/systemd/samba.service
+++ b/packaging/systemd/samba.service
@@ -1,6 +1,7 @@
[Unit]
Description=Samba AD Daemon
-After=syslog.target network.target
+Wants=network-online.target
+After=syslog.target network.target network-online.target
[Service]
Type=notify
--- Additional comment from Dario Lesca on 2017-12-11 10:09:02 EST ---
I have try this patch and now, when I stop/start the server, all work fine.
I have remove my workaround and replace the original samba.service file.
Then I have try to stop and start the addc server: krb5kdc wont start with "KDC: no network interfaces configured" error like as expected.
Then I have add the "network-online.target" string to After= without add the Wants= directive.
Stop the server and start it and krb5kdc start and all work fine.
Then I have add also the Wants= directive, and the story is the same, krb5kdc start correctly.
I thing the first modify (network-online.target) is sufficiet.
At this point I have remove Wants= directive and try to stop/start the server many time and always krb5kdc is started.
NOTE:
a) after all modify to samba.service I have run "systemctl daemon-reload",
b) only a reboot it's not sufficient to check the problem, the server must be stop and started because the server is a Kvm/Qemu virtual server and the problem occur when the host destroy and recreate the interface for the virtual server.
Many thanks Andreas, I hope this help.
Dario
--- Additional comment from Andreas Schneider on 2017-12-12 02:28:56 EST ---
Wants= is needed that systemd check that the specified service is running/enabled.
Robbie, I think you want to add the changes from comment #10 also to krb5kdc.service.
(In reply to Dario Lesca from comment #1)
> it will be fixed also samba-dc for Fedora 27 ?
>
> Thanks
> Dario
Wrong bug; I think you wanted to post on Bug #1496307