On Tue, Feb 22, 2022 at 10:41:50AM -0700, Chris Murphy wrote: > $ cat /usr/lib/systemd/system/dnf-makecache.timer > [Unit] > Description=dnf makecache --timer > ConditionKernelCommandLine=!rd.live.image > # See comment in dnf-makecache.service > ConditionPathExists=!/run/ostree-booted > Wants=network-online.target > > [Timer] > OnBootSec=10min > OnUnitInactiveSec=1h > RandomizedDelaySec=60m > Unit=dnf-makecache.service > > [Install] > WantedBy=timers.target > [chris@fovo ~]$ > > > So what should the Wants be here, instead of network-online.target? > multiuser.target? I suppose they need to be someone tolerant of no > network being available during startup, it does seem to take a while > for wireless connections to succeed, but at least in my case it's up > by the time I've logged in. > > Also the same thing for packagekit.service. > > $ cat /usr/lib/systemd/system/packagekit.service > [Unit] > Description=PackageKit Daemon > # PK doesn't know how to do anything on ostree-managed systems; > # currently the design is to have dedicated daemons like > # eos-updater and rpm-ostree, and gnome-software talks to those. > ConditionPathExists=!/run/ostree-booted > Wants=network-online.target > > [Service] > Type=dbus > BusName=org.freedesktop.PackageKit > User=root > ExecStart=/usr/libexec/packagekitd See my other mail: those two are not a problem. In particular dnf-makecache.timer is started early (as part of timers.target in early boot), but that's OK. At some point is fires and dnf-makecache.service will be started, but that is usually a long time after multi-user.target has been reached and the machine has "finished booting"(*). (*) Quotes are used because this shows that with multiple overlapping targets the definition of "finished" is not clear. > ====== > > $ grep -r "network-online" /usr/lib/systemd/system/ > /usr/lib/systemd/system/NetworkManager-wait-online.service:Before=network-online.target > /usr/lib/systemd/system/NetworkManager-wait-online.service:WantedBy=network-online.target > /usr/lib/systemd/system/NetworkManager.service:# > WantedBy=network-online.target, so enabling it only has an effect if > /usr/lib/systemd/system/NetworkManager.service:# network-online.target > itself is enabled or pulled in by some other unit. > /usr/lib/systemd/system/auditd.service:## uncomment the second so that > network-online.target is part of After. > /usr/lib/systemd/system/auditd.service:##After=network-online.target > local-fs.target systemd-tmpfiles-setup.service > /usr/lib/systemd/system/cups-browsed.service:After=cups.service > avahi-daemon.service network-online.target > /usr/lib/systemd/system/cups-browsed.service:Wants=avahi-daemon.service > network-online.target > /usr/lib/systemd/system/dnf-makecache.service:After=network-online.target > /usr/lib/systemd/system/dnf-makecache.timer:Wants=network-online.target > /usr/lib/systemd/system/dnsmasq.service:;After=network-online.target > /usr/lib/systemd/system/iscsi.service:After=network.target > network-online.target iscsid.service iscsiuio.service > systemd-remount-fs.service > /usr/lib/systemd/system/iscsid.service:After=network-online.target > iscsiuio.service iscsi-init.service > /usr/lib/systemd/system/kdump.service:After=network.target > network-online.target remote-fs.target basic.target > /usr/lib/systemd/system/nfs-mountd.service:Wants=network-online.target > /usr/lib/systemd/system/nfs-mountd.service:After=network-online.target > local-fs.target > /usr/lib/systemd/system/nfs-server.service:Wants=rpcbind.socket > network-online.target > /usr/lib/systemd/system/nfs-server.service:After=network-online.target > local-fs.target > /usr/lib/systemd/system/openvpn-client@.service:After=syslog.target > network-online.target > /usr/lib/systemd/system/openvpn-client@.service:Wants=network-online.target > /usr/lib/systemd/system/openvpn-server@.service:After=syslog.target > network-online.target > /usr/lib/systemd/system/openvpn-server@.service:Wants=network-online.target > /usr/lib/systemd/system/packagekit.service:Wants=network-online.target > /usr/lib/systemd/system/podman-auto-update.service:Wants=network-online.target > /usr/lib/systemd/system/podman-auto-update.service:After=network-online.target > /usr/lib/systemd/system/rpc-statd-notify.service:Wants=network-online.target > /usr/lib/systemd/system/rpc-statd-notify.service:After=local-fs.target > network-online.target nss-lookup.target > /usr/lib/systemd/system/rpc-statd.service:Wants=network-online.target > /usr/lib/systemd/system/rpc-statd.service:After=network-online.target > nss-lookup.target rpcbind.socket > /usr/lib/systemd/system/systemd-networkd-wait-online.service:Before=network-online.target > shutdown.target > /usr/lib/systemd/system/systemd-networkd-wait-online.service:WantedBy=network-online.target > /usr/lib/systemd/system/systemd-networkd.service:# > WantedBy=network-online.target, so enabling it only has an effect if > /usr/lib/systemd/system/systemd-networkd.service:# > network-online.target itself is enabled or pulled in by some other > unit. > It looks like there's potential for more service units causing this > problem than just the two I'm seeing. There's probably some on this list that could lose the dependency, but it's hard to figure out unless you know the implementation intimately. I would ignore them unless an actual issue pops up ;) Zbyszek _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure