Page MenuHomeDevCentral

Configure periodic tasks on FreeBSD
ClosedPublic

Authored by dereckson on Feb 10 2020, 14:08.
Tags
None
Referenced Files
F3752123: D2203.diff
Sun, Nov 17, 16:15
Unknown Object (File)
Sat, Nov 16, 11:20
Unknown Object (File)
Sat, Nov 16, 10:11
Unknown Object (File)
Fri, Nov 15, 01:48
Unknown Object (File)
Fri, Nov 15, 01:25
Unknown Object (File)
Wed, Nov 13, 02:00
Unknown Object (File)
Tue, Nov 12, 16:26
Unknown Object (File)
Tue, Nov 12, 07:15
Subscribers
None

Details

Summary

FreeBSD offers a periodic system to run tasks,
most enabled by default, some to configure.

This change enables the following behavior:

  • update daily ports tree
  • resync NTP clock
  • run ZFS scrub every 5 weeks

Reference: man 5 periodic.conf

Ref T1541 for zfs part.

Test Plan

Configuration extracted from Ysul, to test on WindRiver

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.Feb 10 2020, 14:08

Looks good to me.

WindRiver
$ salt-call --local state.sls roles/core/rc
local:
----------
          ID: /etc/periodic.conf
    Function: file.managed
      Result: True
     Comment: File /etc/periodic.conf updated
     Started: 14:11:49.568994
    Duration: 25.514 ms
     Changes:
              ----------
              diff:
                  New file
              mode:
                  0644

Summary for local
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:  25.514 ms

$ cat /etc/periodic.conf
# 300.calendar
daily_portsnap_enable="YES"

# 480.status-ntpd
daily_status_ntpd_enable="YES"

# 800.scrub-zfs
daily_scrub_zfs_enable="YES"
This revision was automatically updated to reflect the committed changes.