Skip to content

Add support for ietf-schedule basic recurrence#1523

Open
saba8814 wants to merge 1 commit into
kernelkit:mainfrom
saba8814:feat/add-scheduler-support
Open

Add support for ietf-schedule basic recurrence#1523
saba8814 wants to merge 1 commit into
kernelkit:mainfrom
saba8814:feat/add-scheduler-support

Conversation

@saba8814

@saba8814 saba8814 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

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.

image image

Limitations

  • Secondly and Yearly recurrence are not supported, since we can not express them in cron
  • bymonthday only supports positive integer values 1-31 (ietf-schedule ranges are -31..-1 and 1-31)
  • Two predefined-actions defined and implemented, custom command ommitted for now
  • Check update script expects github api style

Future work

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

Comment thread package/confd/crond.conf Outdated
Comment thread src/confd/src/schedule.c Outdated
Comment thread src/confd/yang/confd/infix-schedule@2026-05-27.yang Outdated
Comment thread src/confd/yang/confd/infix-schedule@2026-05-27.yang Outdated
Comment thread src/confd/yang/confd/infix-system-software.yang Outdated
Comment thread src/confd/yang/confd.inc
Comment thread test/case/system/schedule_reboot/test.py Outdated
Comment thread src/confd/yang/confd/infix-schedule@2026-05-27.yang Outdated
Comment thread board/common/rootfs/usr/sbin/infix-check-update Outdated
Comment thread board/common/rootfs/usr/sbin/infix-check-update Outdated
@mattiaswal

Copy link
Copy Markdown
Contributor

Also add the the "magic" key word fix #issue number in the PR description, this closes the open issue automatically when merged.

@saba8814

saba8814 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

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.

@saba8814 saba8814 force-pushed the feat/add-scheduler-support branch 3 times, most recently from 3cb858c to 160857c Compare June 3, 2026 07:58
@saba8814 saba8814 marked this pull request as draft June 3, 2026 08:03
@saba8814 saba8814 force-pushed the feat/add-scheduler-support branch 3 times, most recently from da0d85f to e693075 Compare June 3, 2026 12:58
@saba8814 saba8814 marked this pull request as ready for review June 3, 2026 12:59
@troglobit troglobit changed the title feat: ietf-schedule basic recurrence implementation Add support for ietf-schedule basic recurrence implementation Jun 3, 2026
@troglobit troglobit changed the title Add support for ietf-schedule basic recurrence implementation Add support for ietf-schedule basic recurrence Jun 3, 2026
@troglobit

Copy link
Copy Markdown
Contributor

Still haven't had the time to fully look at this, but a few general pointers that are useful:

  1. Personally I prefer to use "Add support for" instead of "feat:", it feels more human and invites to a discussion
  2. Each PR should have a description which introduces the reviewer to the topic, nothing too in-depth, just a summary of the why:s and what:s to expect. Screenshots is a favorite! This is also a good place to bring up limitations (for example: "most of the advanced features are deviated to allow for a simple good-enough first release", future work, etc.

I hope to have some time tomorrow for a detailed look at the changes 😃

@saba8814

saba8814 commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Still haven't had the time to fully look at this, but a few general pointers that are useful:

  1. Personally I prefer to use "Add support for" instead of "feat:", it feels more human and invites to a discussion
  2. Each PR should have a description which introduces the reviewer to the topic, nothing too in-depth, just a summary of the why:s and what:s to expect. Screenshots is a favorite! This is also a good place to bring up limitations (for example: "most of the advanced features are deviated to allow for a simple good-enough first release", future work, etc.

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.

Comment thread src/confd/src/schedule.c
Comment thread board/common/rootfs/usr/sbin/infix-check-update Outdated
Comment thread src/confd/src/schedule.c Outdated
Comment thread src/confd/src/schedule.c Outdated
Comment thread src/confd/src/schedule.c Outdated
Comment thread src/confd/yang/confd/infix-schedule.yang Outdated
description
"Software management configuration.";

container check-update {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this setting be inside the schudler instead? What do you say @wkz @troglobit

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite possibly, please remind me again of this tomorrow.

Sorry for being so late on the ball!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@saba8814 saba8814 force-pushed the feat/add-scheduler-support branch 2 times, most recently from 455fa85 to 1c5aef8 Compare June 9, 2026 11:24
Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
@saba8814 saba8814 force-pushed the feat/add-scheduler-support branch from 1c5aef8 to 5a91d83 Compare June 9, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants