[opensuse-factory] migrating from cron to systemd-timer

Hi, there seems to be a bigger move to change all cron controlled services to systemd-timers: http://bugzilla.suse.com/show_bug.cgi?id=1115430 I have a few questions left while I'm working on updating a package for it: 1. for which distributions should such a change happen? Just Factory or also 15.1? 2. should the package contain any hints/outputs when this changes? If yes, how? 3. if the package was already installing the cron job directly with installation is it expected that the corresponding service and timer is requested to be added to the defaults or should it stay with the user (who probably does not expect that he needs to do something; see 2.?) Thanks, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On 17/11/2018 09:20, Wolfgang Rosenauer wrote:
For 15.1 it would be up to the maintainer, but I expect that the vast majority of places we are using it in SLE 15 won't be changed until SLE 16 so don't feel like you should do it for 15.1 just because its being done for factory now, but if there's a really good reason for doing it in 15.1 then its a bit different. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Hi, On Fri, Nov 16, Wolfgang Rosenauer wrote:
Depends on ;) At first you should get it working stable including updating from cron to systemd-timer in Factory. If that works without any change for the user, it can go into 15.1, else it should not.
2. should the package contain any hints/outputs when this changes? If yes, how?
If the user has now to make any configuration changes, you should create a README for this.
Depends on the job. If the cron job did always run because it is required, then you should also enable the timer by default. If the cron job only run because it was easier, but does not do anything before the customer does modify/enable something, you should document that the user now has to enable the timer, too. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Am 29.11.18 um 17:29 schrieb Thorsten Kukuk:
Thanks for the answers. So the cron job before was running but it only did something useful if something was configured. Therefore I _guess_ a manual enablement would be the right thing. But then there is the update case where there is a configuration but the upgrade would kill the cronjob and not enable the timer. Is there a way to do it right in this case? Thanks, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Thu, Nov 29, Wolfgang Rosenauer wrote:
In the upgrade case you need to read the config and enable the timer if needed. But that's difficult, as enabling the timer does not necessary start it. You could look at other packages like snapper or btrfsmaintenance, who did something similar already in the past. That's why I wrote: get the update case right in Factory first ;) Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On 17/11/2018 09:20, Wolfgang Rosenauer wrote:
For 15.1 it would be up to the maintainer, but I expect that the vast majority of places we are using it in SLE 15 won't be changed until SLE 16 so don't feel like you should do it for 15.1 just because its being done for factory now, but if there's a really good reason for doing it in 15.1 then its a bit different. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Hi, On Fri, Nov 16, Wolfgang Rosenauer wrote:
Depends on ;) At first you should get it working stable including updating from cron to systemd-timer in Factory. If that works without any change for the user, it can go into 15.1, else it should not.
2. should the package contain any hints/outputs when this changes? If yes, how?
If the user has now to make any configuration changes, you should create a README for this.
Depends on the job. If the cron job did always run because it is required, then you should also enable the timer by default. If the cron job only run because it was easier, but does not do anything before the customer does modify/enable something, you should document that the user now has to enable the timer, too. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Am 29.11.18 um 17:29 schrieb Thorsten Kukuk:
Thanks for the answers. So the cron job before was running but it only did something useful if something was configured. Therefore I _guess_ a manual enablement would be the right thing. But then there is the update case where there is a configuration but the upgrade would kill the cronjob and not enable the timer. Is there a way to do it right in this case? Thanks, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

On Thu, Nov 29, Wolfgang Rosenauer wrote:
In the upgrade case you need to read the config and enable the timer if needed. But that's difficult, as enabling the timer does not necessary start it. You could look at other packages like snapper or btrfsmaintenance, who did something similar already in the past. That's why I wrote: get the update case right in Factory first ;) Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (3)
-
Simon Lees
-
Thorsten Kukuk
-
Wolfgang Rosenauer