Bug 1115457 - storeBackup: migrate from cron to systemd timers
storeBackup: migrate from cron to systemd timers
Status: RESOLVED FEATURE
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
x86-64 All
: P3 - Medium : Normal (vote)
: ---
Assigned To: Danilo Spinella
E-mail List
:
Depends on:
Blocks: 1115430
  Show dependency treegraph
 
Reported: 2018-11-09 15:05 UTC by Kristyna Streitova
Modified: 2022-05-02 10:40 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristyna Streitova 2018-11-09 15:05:26 UTC
This bug is part of TRACKERBUG bug#1115430.

Based on fate#323635 (Reduce usage of cron package in favor of systemd timers) we would like to minimize the number of packages that use cron in favour of systemd timers.

It seems that your package uses cron. Please take a look at it and evaluate if it's possible to migrate your package to use systemd timers without impacting behaviour. If it's not possible, please write down the reason.

Please note that by default, services are not enabled when the package is installed. You probably want your service to be enabled by default so you should create a submit request on systemd-presets-branding-openSUSE package, modifying default-openSUSE.preset file by adding "enable your_service_name.service".
Comment 1 Jan Ritzerfeld 2018-11-09 21:41:02 UTC
"fate#323635" isn't a link and features.opensuse.org tells me that "Feature #323635 does either not exist or you are not authorized to access it.". Where can I find this feature?
Comment 2 Kristyna Streitova 2018-11-16 12:08:32 UTC
(In reply to Jan Ritzerfeld from comment #1)
> "fate#323635" isn't a link and features.opensuse.org tells me that "Feature
> #323635 does either not exist or you are not authorized to access it.".
> Where can I find this feature?

This feature is unfortunately internal, it's mentioned here mainly for tracking purposes. If you have any questions or notes, feel free to ask (here or at the tracker bug if it applies for all packages that should be migrated). Thanks!
Comment 3 Kristyna Streitova 2018-11-16 13:48:16 UTC
(In reply to Kristyna Streitova from comment #0)
> ... modifying default-openSUSE.preset file by adding "enable
> your_service_name.service".

A small correction: it should be "enable your_timer.timer" of course. See [1] for more information about systemd timers packaging. Feel free to enhance this wiki page. Thanks!

[1] https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines#Systemd_timers
Comment 4 Jan Ritzerfeld 2018-11-16 23:36:13 UTC
(In reply to Kristyna Streitova from comment #2)
> This feature is unfortunately internal [...]

That's indeed very unfortunate, since I'm just an external maintainer. So, would you please find an internal one to implement your internal feature requests by yourself?
Comment 5 Kristyna Streitova 2018-11-22 16:43:32 UTC
It is internal because this idea was initially brought for SLES15, that's all :) However, we have public bugs opened for openSUSE now that describe this cron-systemd migration intention that we would like to follow in openSUSE Tumbleweed in the same way the other distributions do.

If you are still missing any information about the migration, then feel free to ask. If you don't feel you can migrate your package then let me know and I can take a look at it.

Thank you.
Comment 6 Jan Ritzerfeld 2018-12-16 17:33:29 UTC
(In reply to Kristyna Streitova from comment #5)
> [...] If you don't feel you can migrate your package then let me know and
> I can take a look at it.

That would be very nice, thank you.
Comment 7 Thomas Wagner 2018-12-30 15:13:30 UTC
Right now, I'm using storeBackup with cron. 
I (and most likely others) use a very distinct feature of /etc/cron.daily, namely that scripts are executed in a given order (in cron's case alphanumerical
order).
This is important because one might want to execute a script directly
before and after using storeBackup, e.g., to mount/unmount the backup
drive or start replication to an off-site machine.

I have only little experience with systemd's timers, so my question is:
Will it be possible to execute a script directly before and after a timer of systemd is triggered?
Such a feature would be quite important.
Comment 8 Danilo Spinella 2021-07-07 10:08:52 UTC
I am taking this bug from Kristyna.

Regarding the execution of scripts before and after storeBackup.timer runs; I think you could add an ExecPre and ExecPost scripts by adding them to the file /etc/systemd/system/storeBackup.service.d/override.conf.
Comment 9 Danilo Spinella 2021-07-21 12:52:43 UTC
This feature has been implemented in Factory.
Comment 10 OBSbugzilla Bot 2022-05-02 10:40:03 UTC
This is an autogenerated message for OBS integration:
This bug (1115457) was mentioned in
https://build.opensuse.org/request/show/974370 Backports:SLE-15-SP4 / systemd-presets-branding-openSUSE