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
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 | ||
| "Software management configuration."; | ||
|
|
||
| container check-update { |
There was a problem hiding this comment.
Shouldn't this setting be inside the schudler instead? What do you say @wkz @troglobit
There was a problem hiding this comment.
Quite possibly, please remind me again of this tomorrow.
Sorry for being so late on the ball!
There was a problem hiding this comment.
I've cleaned up other comments, I will wait on this one until I hear your point of view. I believe it shall be under software yang since we might have "action" in future to manually check for update. FYI: @troglobit @mattiaswal
455fa85 to
1c5aef8
Compare
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
1c5aef8 to
5a91d83
Compare
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: