bundles/zfs: move scrub to systemd-timer
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit

This commit is contained in:
Franzi 2022-02-18 21:10:50 +01:00
parent 40825cec87
commit 14fed8bc6e
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -87,6 +87,10 @@ defaults = {
'when': 'weekly',
'command': '/usr/local/sbin/zfs-auto-snapshot weekly',
},
'zfs-scrub': {
'when': 'Sun 02:00:00 UTC',
'command': '/usr/lib/zfs-linux/scrub',
}
},
},
'zfs': {
@ -135,20 +139,6 @@ if node.has_bundle('telegraf'):
}
@metadata_reactor.provides(
'cron/jobs/zfs-scrub',
)
def zfs_scrub_cronjob(metadata):
when = metadata.get('zfs/scrub/cron', '{} 0 * * sun'.format((node.magic_number % 60)))
return {
'cron': {
'jobs': {
'zfs-scrub': '{} root /usr/lib/zfs-linux/scrub'.format(when),
},
},
}
@metadata_reactor.provides(
'icinga2_api/zfs/services',
)