Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 837908 - net-wireless/unifi-7.0.25 unifi.service: Job network-online.target/start deleted to break ordering cycle starting with unifi.service/start
Summary: net-wireless/unifi-7.0.25 unifi.service: Job network-online.target/start dele...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Conrad Kostecki
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-12 04:50 UTC by Dennis Lamm
Modified: 2022-04-13 13:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Lamm gentoo-dev 2022-04-12 04:50:09 UTC
The used systemd service file leads to the following logged message:

# unifi.service: Job network-online.target/start deleted to break ordering cycle starting with unifi.service/start


Reproducible: Always
Comment 1 Conrad Kostecki gentoo-dev 2022-04-12 08:33:51 UTC
Does the message disappear, if you do remove 'After=network-online.target' from unit?
Comment 2 Adrian Schollmeyer 2022-04-13 13:29:30 UTC
I don't think that network.target is the right target to specify in WantedBy. According to [1], the network.target indicates when the network functionality is available, so I think only providers of the network connection (e.g. netifrc, NetworkManager) should somehow provide network.target. Also, network-online.target indicates that the network is already online, which can't be the case for services starting in network.target as they are the ones that need to do the work to reach network-online.target.

When wanting a network when starting the application, one should rather use Wants=network.target and After=network.target. And since this daemon probably doesn't provide network connectivity, it should rather be WantedBy=multi-user.target or WantedBy=default.target.

Swithing to multi-user.target or default.target is probably the right solution for this problem.

[1] https://www.freedesktop.org/software/systemd/man/systemd.special.html
Comment 3 Larry the Git Cow gentoo-dev 2022-04-13 13:42:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=372e0e11f3768b2f50eb844f5ae430498bc73fc5

commit 372e0e11f3768b2f50eb844f5ae430498bc73fc5
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2022-04-13 13:39:39 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2022-04-13 13:39:39 +0000

    net-wireless/unifi: fix systemd unit
    
    Closes: https://bugs.gentoo.org/837908
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 net-wireless/unifi/files/{unifi.service-r1 => unifi.service-r2}       | 4 ++--
 net-wireless/unifi/{unifi-6.5.55-r1.ebuild => unifi-6.5.55-r2.ebuild} | 2 +-
 net-wireless/unifi/{unifi-7.0.25-r1.ebuild => unifi-7.0.25-r2.ebuild} | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
Comment 4 Conrad Kostecki gentoo-dev 2022-04-13 13:42:44 UTC
Thank you!