On Wed, 2025-11-19 at 18:10 -0800, Gordon Messmer wrote:
> I am actually perplexed by this one, and I wonder if what I'm seeing is
> a bug in systemd init.
>
> On my Fedora Workstation install, gdm runs after network-online. The
> gdm.service unit runs After systemd-user-sessions.service, which runs
> After remote-fs.target. All of that is expected. But remote-fs.target is
> definitely starting after network-online.target, which is not expected.
> In the plot svg, remote-fs.target says that it runs After iscsi.service,
> and network-online.target says that it runs before iscsi.service, but
> the iscsi.service unit is disabled, so it doesn't show up anywhere in
> the plot, except as a dependency of other units.
>
> https://gordonmessmer.fedorapeople.org/systemd-plot/bootup-fedora-ws.svg
>
> If I delete the unit entirely, then gdm.service runs before
> network-online, which we want.
>
> https://gordonmessmer.fedorapeople.org/systemd-plot/bootup-fedora-ws-no-iscsi.svg
>
> So, the first mystery is that iscsi.service is creating an ordering
> dependency even though it's disabled.
>
> The second mystery is that I can only reproduce this problem on *some*
> systems, and I cannot find anything they have in common. I don't know
> why it affects some systems and not others.
>
> I can reproduce the problem on my personal Workstation 42 install, but
> not the Workstation 43 install on my employer-provided laptop.
>
> I can reproduce the problem on a VM that boots the Workstation-43-Live
> ISO, but then it won't happen on the same VM if I install Fedora on a
> virtual disk and boot from that disk instead of the ISO.
>
> The problem was brought to my attention by a user with Fedora 43 KDE.
>
> How might I determine why systemd is starting remote-fs.target after
> network-online.target on some systems, but not others, when all of them
> have an iscsi.service unit which is disabled, and deleting that unit
> appears to resolve the problem on the affected hosts?
In case you're not aware, systemd generates dependencies for 'special'
targets / services in some situations. Both network-online.target and
remote-fs.target have at least some such cases in the source. grepping
src/ for for network-online or remote-fs finds them:
[adamw@toolbx fedora-toolbox-43 systemd (main %)]$ grep -R network-online src/
src/basic/special.h:#define SPECIAL_NETWORK_ONLINE_TARGET
"network-online.target"
src/core/mount.c: /* We pull in network-online.target, and order
ourselves after it. This is useful at start-up to
src/import/import-generator.c:
fputs("Wants=network-online.target\n"
src/import/import-generator.c:
"After=network-online.target\n", f);
src/sysv-generator/sysv-generator.c: /* the
network-online target is special, as it needs to be actively pulled in */
[adamw@toolbx fedora-toolbox-43 systemd (main %)]$ grep -R remote-fs src/
src/basic/special.h:#define SPECIAL_REMOTE_FS_TARGET "remote-fs.target"
/* LSB's $remote_fs */
src/basic/special.h:#define SPECIAL_REMOTE_FS_PRE_TARGET "remote-fs-pre.target"
src/cryptsetup/cryptsetup-generator.c: fprintf(f,
"After=remote-fs-pre.target\n");
src/fstab-generator/fstab-generator.c: /* Don't set default
ordering dependencies on local-fs.target or remote-fs.target, but we
src/integritysetup/integritysetup-generator.c: fprintf(f,
"After=remote-fs-pre.target\n");
src/test/test-unit-name.c:
test_unit_name_from_dbus_path_one("/org/freedesktop/systemd1/unit/remote_2dfs_2dpre_2etarget",
0, "remote-fs-pre.target");
src/test/test-unit-name.c:
test_unit_name_from_dbus_path_one("/org/freedesktop/systemd1/unit/remote_2dfs_2etarget",
0, "remote-fs.target");
src/veritysetup/veritysetup-generator.c: fprintf(f,
"After=remote-fs-pre.target\n");
--
Adam Williamson (he/him/his)
Fedora QA
Fedora Chat: @adamwill:fedora.im | Mastodon: @[email protected]
https://www.happyassassin.net
--
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue