bundles/zfs: move scrub to systemd-timer
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
Some checks failed
kunsi/bundlewrap/pipeline/head There was a failure building this commit
This commit is contained in:
parent
40825cec87
commit
14fed8bc6e
1 changed files with 4 additions and 14 deletions
|
@ -87,6 +87,10 @@ defaults = {
|
||||||
'when': 'weekly',
|
'when': 'weekly',
|
||||||
'command': '/usr/local/sbin/zfs-auto-snapshot weekly',
|
'command': '/usr/local/sbin/zfs-auto-snapshot weekly',
|
||||||
},
|
},
|
||||||
|
'zfs-scrub': {
|
||||||
|
'when': 'Sun 02:00:00 UTC',
|
||||||
|
'command': '/usr/lib/zfs-linux/scrub',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'zfs': {
|
'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(
|
@metadata_reactor.provides(
|
||||||
'icinga2_api/zfs/services',
|
'icinga2_api/zfs/services',
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue