-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v245-stable: ordering cycle reported, prevents non-root login or failed automount #69
Comments
Seems I don't have rights in systemd-stable repo to transfer issues, @poettering, @keszybz, any chance you can hook me up? :-) Since this is a straight backport of systemd/systemd@b3d7aef, this is something we should ideally centralise discussion of on the main repo. It's not immediately obvious to me why that change would cause this problem, but probably it's exposing some other overall dependency issue. cc @fbuihuu, who has more context. |
From a quick glance, it seems that all problematic cases make the automount unit use This doesn't look correct since automount units are supposed to be ordered before @cdown do you know why this requirement is needed ? |
Something strange is that the ordering cycle should have already existed if the automount unit was generated by fstab-generator, which seems to be the case from one report. |
Right, but shouldn't this then also have happened with fstab-generator before?
I assume it's a well-intentioned attempt to make network shares contingent on the network. Certainly it feels like the way we expose this issue to users (hey, you can't log in!) is probably the worst manifestation I could conjure, though. It would be nice if we could surface this somewhere earlier. |
That's what is puzzling me currently (see my previous comment). I did give it a try on my archlinux VM and I still could see the ordering cycle with systemd-243.162-2-x86_64.pkg.tar.xz (that was the latest version available locally which doesn't have the suspected commits):
But for some reasons no jobs was deleted in order to break this cycle here, which was the case when I tested systemd-245.6-4-x86_64.pkg.tar.zst... |
But that seems wrong - automount units are supposed to be ordered before local-fs.target so also ordering them after I think only mount units should depend on the network but ordering against network-online.target is probably the wrong target to choose. And fstab-generator is supposed to add the network deps automatically anyway (you can also force it to do so with |
Sure, I don't think it actually does what they expect, but it's well-intentioned. I can see why people would think they should do that. |
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
Hmm... wait. If an entry in fstab uses the following options: Is the dependency on Currently it applies to the automount unit but I'm not sure if this is really intended... |
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
…ied to the mount unit If an entry in fstab uses "x-systemd.automount" option and also asks for additionnal dependencies via x-systemd.requires or such, then the dependencies were applied to the automount unit. But this unlikely to do the right thing and is consistent with network mount network mounts. Indeed for entries specifying "_netdev,x-systemd.automount" options, both a network mount is generated as well as an automount one. But the network dependencies are only applied to the mount unit, the automount unit remains ordered against local-fs.target. The same logic should be followed when extra deps are specified via the mount options as automount units should always be ordered against local-fs.target. Note: in general such extra deps should be used with care and should specify dependencies on other mount units only. Indeed it can easily create ordering cycles like it's been seen in systemd/systemd-stable#69 as mount units (as well as automount ones) are ordered before local-fs.target which is a low-level target that most other units depend on.
…ied to the mount unit If an entry in fstab uses "x-systemd.automount" option and also asks for additionnal dependencies via x-systemd.requires or such, then the dependencies were applied to the automount unit. But this unlikely to do the right thing and is inconsistent with what's done for network mounts. Indeed when an fstab entries has "_netdev,x-systemd.automount" options, the dependencies against the network requested by "_netdev" are (correctly) applied to the mount unit only and the automount unit remains ordered against local-fs.target. The same logic should be followed when extra deps are specified via the mount options as automount units should always be ordered against local-fs.target. Note: in general explicit deps specified via mount options should be used with care and should be used to specify dependencies on other mount units only as it can easily create ordering cycles otherwise like it's been seen in systemd/systemd-stable#69. Mount units (as well as automount ones) are ordered before local-fs.target by default which is a low-level target that most other units depend on.
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 #69. 0: https://bugs.archlinux.org/task/66908 (cherry picked from commit 69876f9)
…ied to the mount unit If an entry in fstab uses "x-systemd.automount" option and also asks for additionnal dependencies via x-systemd.requires or such, then the dependencies were applied to the automount unit. But this unlikely to do the right thing and is inconsistent with what's done for network mounts. Indeed when an fstab entries has "_netdev,x-systemd.automount" options, the dependencies against the network requested by "_netdev" are (correctly) applied to the mount unit only and the automount unit remains ordered against local-fs.target. The same logic should be followed when extra deps are specified via the mount options as automount units should always be ordered against local-fs.target. Note: in general explicit deps specified via mount options should be used with care and should be used to specify dependencies on other mount units only as it can easily create ordering cycles otherwise like it's been seen in #69. Mount units (as well as automount ones) are ordered before local-fs.target by default which is a low-level target that most other units depend on. (cherry picked from commit 045c5fa)
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 (cherry picked from commit 69876f9)
…ied to the mount unit If an entry in fstab uses "x-systemd.automount" option and also asks for additionnal dependencies via x-systemd.requires or such, then the dependencies were applied to the automount unit. But this unlikely to do the right thing and is inconsistent with what's done for network mounts. Indeed when an fstab entries has "_netdev,x-systemd.automount" options, the dependencies against the network requested by "_netdev" are (correctly) applied to the mount unit only and the automount unit remains ordered against local-fs.target. The same logic should be followed when extra deps are specified via the mount options as automount units should always be ordered against local-fs.target. Note: in general explicit deps specified via mount options should be used with care and should be used to specify dependencies on other mount units only as it can easily create ordering cycles otherwise like it's been seen in systemd/systemd-stable#69. Mount units (as well as automount ones) are ordered before local-fs.target by default which is a low-level target that most other units depend on. (cherry picked from commit 045c5fa)
v245.7 has bc740e3, let's close this. |
Using Arch Linux we run into a new bug in stable release 245.6 that introduces a "Ordering cycle reported" leading to random services not properly loaded and login or automount failing.
Bisected to this commit and reverting it seems to fix it:
e1c091b
Downstream report: https://bugs.archlinux.org/task/66908
The text was updated successfully, but these errors were encountered: