Bug 1525232

Summary: Fix network service dependencies
Product: Red Hat Enterprise Linux 7 Reporter: Robbie Harwood <rharwood>
Component: krb5Assignee: Robbie Harwood <rharwood>
Status: CLOSED ERRATA QA Contact: Patrik Kis <pkis>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.4CC: abokovoy, anoopcs, asn, d.lesca, dpal, extras-orphan, extras-qa, fumiyas, gdeschner, jarrpa, j, linforpros, lmohanty, madam, nalin, npmccallum, pasik, pkis, rharwood, sbose, ssorce
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: krb5-1.15.1-25.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: 1525230 Environment:
Last Closed: 2018-10-30 08:08:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1525230    
Bug Blocks:    

Description Robbie Harwood 2017-12-12 20:45:19 UTC
+++ This bug was initially created as a clone of Bug #1525230 +++

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 5 errata-xmlrpc 2018-10-30 08:08:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:3071