Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-user-sessions.service After=network.target causes 90s boot delay #4010

Closed
1 task done
networkimprov opened this issue Aug 21, 2016 · 6 comments
Closed
1 task done

Comments

@networkimprov
Copy link

Submission type

  • Bug report

systemd version the issue has been seen with

230+

Used distribution

Arch Linux

In case of bug report: Unexpected behaviour you saw

Startup has 90s delay

In case of bug report: Steps to reproduce the problem

https://bbs.archlinux.org/viewtopic.php?pid=1632295#p1632295
This commit is the cause: 8c85680

@mbiebl
Copy link
Contributor

mbiebl commented Aug 21, 2016

I don't think this is a bug in systemd but in your network configuration (tool).
It shouldn't attempt a network connection (and timing out) if not network cable is plugged in.

@networkimprov
Copy link
Author

It's not attempting a network connection. In my case (which I didn't post on the Arch BBS) it's waiting for the usb0 interface, which only appears if the user starts a usb-gadget for ethernet after boot. Prior to r230 the network configuration became active when/if the interface appeared.

@poettering
Copy link
Member

your network management solution isn't really using network.target properly. It should not block on such external events. Or if it does then it should order itself before network-online.target, not network.target.

See https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget for more information about this.

Closing.

@networkimprov
Copy link
Author

netctl@.service has been working for a long time:

[Unit]
Description=Networking for netctl profile %I
Documentation=man:netctl.profile(5)
After=network-pre.target
Before=network.target netctl.service
Wants=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/network/network start %I
ExecStop=/usr/lib/network/network stop %I

@joukewitteveen
Copy link
Contributor

I cannot really see the proper way for netctl to order itself. The current status of ordering before network.target is the result of much testing and investigation, including the page linked by @poettering.
As a network manager, netctl has to place itself before network.target in order to make sure it will not bring down the network too early on shut down.

For the usb gadget, I fail to see why you would want to enable a profile when the presence of the device is not certain at boot time. Maybe you are better off with a udev rule that runs netctl start <profile> whenever the device is plugged in.

@networkimprov
Copy link
Author

networkimprov commented Aug 25, 2016

@joukewitteveen, you may need to open a new issue to have your perspective considered. I can't re-open this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants