Bug 1525230 - Fix network service dependencies
Summary: Fix network service dependencies
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: krb5
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Robbie Harwood
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1525232
TreeView+ depends on / blocked
 
Reported: 2017-12-12 20:43 UTC by Robbie Harwood
Modified: 2017-12-13 15:19 UTC (History)
19 users (show)

Fixed In Version: krb5-1.16-2.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1496307
: 1525232 (view as bug list)
Environment:
Last Closed: 2017-12-12 22:10:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robbie Harwood 2017-12-12 20:43:33 UTC
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.

Comment 1 Dario Lesca 2017-12-13 00:00:07 UTC
it will be fixed also samba-dc for Fedora 27 ?

Thanks
Dario

Comment 2 Robbie Harwood 2017-12-13 15:19:30 UTC
(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


Note You need to log in before you can comment on or make changes to this bug.