Skip to content

doc: Try to clarify automount dependency confusion#16114

Merged
poettering merged 1 commit intosystemd:masterfrom
cdown:automount_doc
Jun 9, 2020
Merged

doc: Try to clarify automount dependency confusion#16114
poettering merged 1 commit intosystemd:masterfrom
cdown:automount_doc

Conversation

@cdown
Copy link
Member

@cdown cdown commented Jun 9, 2020

Arch recently upgraded systemd to 245.6. Shortly afterwards, users began
reporting[0] that systemd detected an ordering cycle, and they were
unable to log in. The reason they were unable to log in was because of
ordering cycle resolution:

[...]
systemd[1]: sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
systemd[1]: sysinit.target: Job systemd-update-done.service/start deleted to break ordering cycle starting with sysinit.target/start
systemd[1]: sysinit.target: Job systemd-journal-catalog-update.service/start deleted to break ordering cycle starting with sysinit.target/start
systemd[1]: sysinit.target: Job local-fs.target/start deleted to break ordering cycle starting with sysinit.target/start
systemd[1]: sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
[...]

Whether the resolution did the right thing here or not is a longer-term
discussion, but in the interim we should at least make this distinction
between automount dependencies and mount dependencies clearer in the
documentation, so that users and distribution maintainers know what's
acceptable. In this case Arch actually backed out b3d7aef entirely and
released a new version due to the confusion.

Also see systemd/systemd-stable#69.

0: https://bugs.archlinux.org/task/66908

Arch recently upgraded systemd to 245.6. Shortly afterwards, users began
reporting[0] that systemd detected an ordering cycle, and they were
unable to log in. The reason they were unable to log in was because of
ordering cycle resolution:

    [...]
    systemd[1]: sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job systemd-update-done.service/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job systemd-journal-catalog-update.service/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job local-fs.target/start deleted to break ordering cycle starting with sysinit.target/start
    systemd[1]: sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
    [...]

Whether the resolution did the right thing here or not is a longer-term
discussion, but in the interim we should at least make this distinction
between automount dependencies and mount dependencies clearer in the
documentation, so that users and distribution maintainers know what's
acceptable. In this case Arch actually backed out b3d7aef entirely and
released a new version due to the confusion.

Also see systemd/systemd-stable#69.

0: https://bugs.archlinux.org/task/66908
@cdown
Copy link
Member Author

cdown commented Jun 9, 2020

Cc: @fbuihuu

@fbuihuu
Copy link
Contributor

fbuihuu commented Jun 9, 2020

@cdown in order to clarify, could you confirm that the odering cycle was already present prior to 245.6 ?

@cdown
Copy link
Member Author

cdown commented Jun 9, 2020

Judging by the code, the reason it wasn't present before is because these automount units are being created outside fstab-generator.

@fbuihuu
Copy link
Contributor

fbuihuu commented Jun 9, 2020

I don't think it really matters whether the dep on network-online.target was added manually or by fstab-generator.

My question is whether the ordering cycle already existed if the dep was explicitly configured with an older version.

@cdown
Copy link
Member Author

cdown commented Jun 9, 2020

No, I mean, we don't have Before=local-fs.target on automounts not generated by fstab-generator, right?

@poettering poettering merged commit 69876f9 into systemd:master Jun 9, 2020
@fbuihuu
Copy link
Contributor

fbuihuu commented Jun 9, 2020

ah ok, yes Before=local-fs.target wasn't added automatically before but I think it was a mistake.

@fbuihuu
Copy link
Contributor

fbuihuu commented Jun 9, 2020

But someone in https://bugs.archlinux.org/task/66908 reported to an issue with automount generated by fstab-generator.

svenstaro pushed a commit to archlinux/svntogit-packages that referenced this pull request Jul 21, 2020
This was never the right thing to do. Cyclic dependencies existed because users
decided to hand roll their own automount units with incorrect dependencies
rather than relying on the fstab generator. Upstream changes simply exposed
these always-wrong units as being wrong (albeit not in the best of ways).
Upstream will *not* be reverting anything in the short or long term here,
so neither should Arch. What upstream *is* doing is clarifying the documentation
about automounts[0] to try to discouarge this in the future.

I'm removing this revert to make sure that the next systemd build does not
include this.

[0] systemd/systemd#16114

git-svn-id: file:///srv/repos/svn-packages/svn@388755 eb2447ed-0c53-47e4-bac8-5bc4a241df78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants