Bug 1076053 - openldap startup dependency
Summary: openldap startup dependency
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-13 12:41 UTC by Iestyn Elfick
Modified: 2017-09-13 15:45 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-17 20:03:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
[PATCH] only use Before=network-online.target in NM-wait-online.service (1.35 KB, patch)
2014-04-11 09:24 UTC, Jirka Klimes
no flags Details | Diff

Description Iestyn Elfick 2014-03-13 12:41:33 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Zbigniew Jędrzejewski-Szmek 2014-03-13 12:46:01 UTC
?

Comment 2 Iestyn Elfick 2014-03-13 16:42:57 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #1)
> ?

Sorry, I thought I had not submitted earlier. Anyway, now updated.

Comment 3 Zbigniew Jędrzejewski-Szmek 2014-03-15 03:55:30 UTC
Agreed, it looks wrong for NetworkManager-wait-online.service to order itself before network.target.

Comment 4 Zbigniew Jędrzejewski-Szmek 2014-03-15 03:58:10 UTC
I'm reassigning this to NetworkManager then. Maybe they have some comments.

Comment 5 Jirka Klimes 2014-04-11 09:18:47 UTC
Copying the problem description from "Doc Text" to normal comment:

The default Fedora 19 (and previous Fedora releases) configuration has the NetworkManager-wait-online.service start Before both the network.target and the network-online.target. This means enabling NetworkManager-wait-online.service delays all units which start After the network.target.

This does not make sense to me. Some services which depend on the network start without problems if the network is not yet fully configured (but in the process of being so) and other services actually need a fully configured and operational network. As far as I can see, in order to minimise delay, the former could be made to start with After=network.target and the latter After=network-online.target but this requires NetworkManager-wait-online.service to be configured After=network.target and Before=network-online.target (which is NOT the case).

Case in point: I use a development box which is connected to a public wireless network and locally runs DNS, Kerberos and OpenLDAP off an internal ethernet bridge. The networking is setup using NetworkManager and works just fine. The DNS and Kerberos service start without problems: they are configured (the default) After=network.target and are able to start before the network is fully configured. However, OpenLDAP consistently fails to start at boot (also configured After=network.target) because the network is not fully configured when it starts. Enabling NetworkManager-wait-online.service delays all the services (DNS, Kerberos and LDAP), but at least LDAP is able to start.

Changing the default configuration of NetworkManager-wait-online.service to After=network.target and Before=network-online.target and that of slapd.service to After=network-online.target (instead of After=network.target) also fixes the LDAP startup issue, but allows all other network services to start much earlier (reducing overall boot time).

So:

1. Does the default configuration of NetworkManager-wait-online.service make sense?

2. What is the point of having the two targets network.target and network-online.target if they are inextricably linked (i.e. you can either have network.target or (network.target and network-online.target) but not (network.target then network-online.target)?

Have I overlooked something and missed the logic behind the default configuration?

Comment 6 Jirka Klimes 2014-04-11 09:24:19 UTC
Created attachment 885310 [details]
[PATCH] only use Before=network-online.target in NM-wait-online.service

I propose this patch, please review and comment on it.

Comment 7 Lukáš Nykrýn 2014-04-11 09:49:43 UTC
Looks good to me.

Comment 8 Jóhann B. Guðmundsson 2014-04-11 10:03:48 UTC
(In reply to Jirka Klimes from comment #5)

> Have I overlooked something and missed the logic behind the default
> configuration?

man systemd.special to see the purpose and the problem network-online.target aims at resolving. 

You should know that systemd is in the midst of implementing it's own low-level network device settings ( systemd 210+ ), replacing the legacy network script as well as obsoleting the use of NM on embedded/cloud/containers/servers. 

Once that work is in place units will be updated accordingly with correct requirements which hopefully should simplify these things quite a bit.

Comment 9 Dan Williams 2014-04-11 20:15:31 UTC
The bits in NetworkManager-wait-online were suggested by Lennart here:

https://bugzilla.redhat.com/show_bug.cgi?id=787314#c37

Is that comment no longer correct?

Comment 10 Dan Williams 2014-04-11 20:17:40 UTC
(In reply to Jóhann B. Guðmundsson from comment #8)
> (In reply to Jirka Klimes from comment #5)
> 
> > Have I overlooked something and missed the logic behind the default
> > configuration?
> 
> man systemd.special to see the purpose and the problem network-online.target
> aims at resolving. 
> 
> You should know that systemd is in the midst of implementing it's own
> low-level network device settings ( systemd 210+ ), replacing the legacy
> network script as well as obsoleting the use of NM on
> embedded/cloud/containers/servers. 

Yes, we're aware of the changes going on with systemd, and we're also in the midst of making NetworkManager more sutiable for these configurations as well, and getting the word out on the cooperative changes and enterprise enhancements we've made to NetworkManager over the past year.

Comment 11 Iestyn Elfick 2014-08-31 18:32:46 UTC
The latest release on Fedora 19 (systemd-204-21.fc19) make matters worse: enabling NetworkManager-wait-online and having slapd.service start *after* the network-online.target is no longer enough to get slapd to start correct with my configuration (i.e. running off an internal ethernet bridge).

I've worked around the problem by using 'restart=on-failure' and 'restartsec=30' but at least you should be aware that of the issue.

Comment 12 Fedora End Of Life 2015-01-09 21:13:55 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Fedora End Of Life 2015-02-17 20:03:09 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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