Comment by magicalhippo

Comment by magicalhippo 5 days ago

6 replies

> https://github.com/systemd/systemd/issues/4880

I'm not a systemd hater or anything, but I continue to read stuff from Poettering which to me is deeply disturbing given the programs he works on.

Saying it's not a bug that service is launched despite a stated required prerequisite dependency failed... WTF?

Sure, I agree with him that most computers should probably boot despite NTP being unable to sync. But proposing that the solution to that is breaking Requires is just wild to me.

jcgl 5 days ago

I'm not sure I understand why you think the solution proposed there is so bad.

The question in that issue is around the semantics of time-sync.target. Targets are synchronization points for the system and don't (afaik) generally make promises about the units that are ordered before them (in this case chrony-wait.service.

Does that answer your specific objection of "proposing that the solution to that is breaking Requires is just wild to me"? Basically, what is proposed in that issue is not breaking Requires=. The proposition is that the user add their own, specific Requires= as a drop-in configuration since that's not a generally-applicable default.

  • magicalhippo 5 days ago

    No, that does not make sense, because it goes against the systemd documentation.

    Targets[1]: Target units do not offer any additional functionality on top of the generic functionality provided by units. They merely group units, allowing a single target name to be used in Wants= and Requires= settings to establish a dependency on a set of units defined by the target, and in Before= and After= settings to establish ordering.

    boot-complete.target[2]: Order units that shall only run when the boot process is considered successful after the target unit and pull in the target from it, also with Requires=.

    Note use of "only run" with a reference to Requires=.

    time-sync.target[3]: This target provides stricter clock accuracy guarantees than time-set.target (see above), but likely requires network communication and thus introduces unpredictable delays. Services that require clock accuracy and where network communication delays are acceptable should use this target.

    Especially note the last sentence there.

    The documentation clearly indicates that targets can fail, and that services that needs the target to be successful, should use Requires= to specify that.

    If the above is not true, the Requires= and Targets documentation should be rewritten to explicitly say that targets might fulfill Requires= regardless of state. Also, the documentation for time-sync.target should explicitly remove the last sentence and instead state there is no functional difference between Requires=time-sync.target and Wants=time-sync.target, it is best-effort only.

    [1]: https://www.freedesktop.org/software/systemd/man/latest/syst...

    [2]: https://www.freedesktop.org/software/systemd/man/latest/syst...

    [3]: https://www.freedesktop.org/software/systemd/man/latest/syst...

    • jcgl 5 days ago

      That seems like a fair point about the documentation! As far as I can see, you're right.

      • magicalhippo 5 days ago

        So that's why I find his statements disturbing.

        If he really don't want targets to deliver failed/success guarantees, then they've massively miscommunicated in their documentation. That in my book is a huge deal.

        In either case the issue should in no circumstance be casually dismissed as not-a-bug without further action.