Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509692 - sys-process/cronie: systemd unit should have After=network.target
Summary: sys-process/cronie: systemd unit should have After=network.target
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-06 14:23 UTC by Leho Kraav (:macmaN @lkraav)
Modified: 2014-05-06 15:12 UTC (History)
2 users (show)

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 Leho Kraav (:macmaN @lkraav) 2014-05-06 14:23:26 UTC
My particular use case is launching user specific vncserver instances with @reboot. Service launches fail because the binding interface isn't initialized when cron daemon starts.

Yes I can make systemd units for my services, but I think there's still an issue here.

Similar discussion https://bugzilla.redhat.com/show_bug.cgi?id=747759

Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2014-05-06 15:10:08 UTC
Upstream is Fedora. Their solution to the referenced Red Hat bug was to make cronie start after sssd.service and ypbind.service to prevent NSS lookup failures.

http://pkgs.fedoraproject.org/cgit/cronie.git/commit/cronie.systemd?id=00f22a545119a93f54b0257d71d0b98ecb1407b2

That issue is a bit different from your issue, where you are actually starting a network daemon (vncserver) from a cron job.

I don't think it necessarily makes sense to have cron start after network.target for all Gentoo users. I think it is quite rare that an @reboot job would require network access.

If you need it for your use case, you can override the unit like this:

$ cat /etc/systemd/system/cronie.service.d/network.conf
[Unit]
After=network.service
Comment 2 Leho Kraav (:macmaN @lkraav) 2014-05-06 15:11:18 UTC
Learning about section level overrides in systemd was worth filing the bug. Thanks.
Comment 3 Mike Gilbert gentoo-dev 2014-05-06 15:12:49 UTC
Oops; I mixed up .service and .target in my head. That should read:

[Unit]
After=network.target