Re: Fedora 32 System-Wide Change proposal: Enable fstrim.timer by default

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

 



On Thu, Dec 19, 2019 at 10:39:45PM -0500, Stuart D. Gathman wrote:
> On Thu, 19 Dec 2019, Ben Cotton wrote:
> 
> >https://fedoraproject.org/wiki/Changes/EnableFSTrimTimer
> >
> >== Summary ==
> >Enabling fstrim.timer will cause fstrim.service to execute weekly,
> >which in turn executes `/usr/sbin/fstrim --fstab --verbose --quiet`
> 
> >== How To Test ==
> >The low level function of systemd timers, fstrim.service, and fstrim
> >command are well understood and tested already, all Fedora needs to
> >test is that the timer is enabled following clean installation and
> >upgrades:
> 
> After the initial change of defaults, the fstrim.timer SHOULD NOT be
> re-enabled on subsequent updates if a user (who like me prefers choosing
> when to run fstrim on which filesystem) has disabled it.

The proposal mentions "modifying 90-default.preset to enable fstrim.timer".
The effect of a change to presets is that when a *new* package is
installed, the default %systemd_post scriptlet will enable the unit.
Just changing the default doesn't effect existing systems (precisely
speaking, systems which already had the rpm installed which provides
the given service).

This means that the part of the description:
> fstrim.timer will be enabled on upgrade. An upgraded system should
> exhibit the same behaviors as a clean installed system.
does not match the proposed implementation.

*If* it was desired to have new setting also take effect on upgrades
(I'm not saying if that is appropriate, just describing a possible
mechanism), a scriptlet could be added (in util-linux most likely),
that would do convert existing scriptlets:

%triggerpostun -- fedora-release < 32
systemctl preset fstrim.service

Users who want to opt-out of the upgrade would have to either call
systemctl disable to undo the change or, more cleanly, create a dropin
before the upgrade:
# /etc/systemd/system-preset/10-no-fstrim.preset
disable fstrim.service

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




[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