Re: No daemon-reload or restart with %systemd_postun_with_restart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 25, 2022 at 07:07:22PM -0400, Sam Varshavchik wrote:
> Zbigniew Jędrzejewski-Szmek writes:
> 
> > > > That the service is "oneshot" matters for the "restart" part. What
> > > > systemd actually does, is queue a "try-restart" job for the marked units.
> > > > Since this service is not running, that should become noop.
> > > > There seems to be a bug in the implementation though: try-restart always
> > > > restarts the unit → https://github.com/systemd/systemd/issues/22850.
> > >
> > > Are you saying that if it wasn't a oneshot service, it would get restarted?
> > 
> > No. I'm saying that oneshot services get restarted even if they shouldn't
> > due to a bug. So once you fix the path, I expect that you'll go from
> > no-restarts to sometimes-too-many-restarts ;)
> 
> Well, I got one restart in the bag, now. Whether I'll end up with too many
> restarts, that's something that only future will tell...
> 
> But this problem was very hard to see:
> 
> lrwxrwxrwx. 1 root root 7 Jul 21  2021 /lib → usr/lib
> 
> Having a package install its service file via /lib broke these triggers. And
> there was no outward sign that there was anything wrong. The service stops
> fine, and it starts just fine. Only a reload or a restart does not work and
> there's no blinking sign anywhere that tells you what's wrong, exactly.

Our packaging guidelines say to use %{_unitdir} i.e. /usr/lib/systemd/system,
so this problem is unique to your custom package.

I think it might be reasonable to add non-usr-prefixed paths to the
transfiletriggers path lists to make this more robust for "foreign" packages.
I'll try to submit a patch upstream.

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux