Add support for ietf-schedule basic recurrence#1523
Conversation
|
Also add the the "magic" key word fix #issue number in the PR description, this closes the open issue automatically when merged. |
Thing is #1301 is formulated in way that it is support for full unattended upgrade, and this PR adds scheduling stuff and just a check for update availiability thus I ommited it from git message, since full implementation of unnattended-upgrade will be handled in a separete merge request. |
3cb858c to
160857c
Compare
8c163b0 to
da0d85f
Compare
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
da0d85f to
e693075
Compare
|
Still haven't had the time to fully look at this, but a few general pointers that are useful:
I hope to have some time tomorrow for a detailed look at the changes 😃 |
Thank you, I've added description now, hope it is not too long. |
Description
Why
Infix did not have scheduling system, thus this PR adds support for ietf-schedule(RFC9922) standard yang that is wired into the system using crontab. Additionally this PR adds 2 predefined actions that are check-update and reboot.
What to Expect
Scheduler (infix-schedule) — a new YANG module augmenting ietf-system with a schedules list. Each schedule has a recurrence rule and a predefined action. A regression test testing scheduling of reboot predefined-action. Example configuration:
{ "ietf-system": { "system": { "infix-schedule:schedules": { "schedule": [ { "name": "reboot-test", "enabled": true, "predefined-action": "infix-schedule:reboot", "recurrence": { "frequency": "infix-schedule:minutely", "interval": 1 } } ] } } } }Firmware update check — when check-update fires, /usr/sbin/infix-check-update queries the GitHub releases API, compares the latest tag against the running version, and writes a notification to /run/infix-update. The login banner picks this up and displays it to the admin.
Limitations
Future work
Checklist
Tick relevant boxes, this PR is-a or has-a: