Skip to content

Conversation

@mattiaswal
Copy link
Contributor

@mattiaswal mattiaswal commented Oct 26, 2025

Instead of having separate callbacks for each model, use one callback.
This allows us to handle dependencies between models in a controlled way,
Adding dependencies to the diff, before running the real change "callbacks".

Also fix some minor bugs.

Most likely fixes #855

Description

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):

@mattiaswal mattiaswal added the ci:main Build default defconfig, not minimal label Oct 26, 2025
@mattiaswal mattiaswal force-pushed the confd-refactor-callbacks branch 7 times, most recently from 9e23bca to 2a22330 Compare October 29, 2025 07:47
@mattiaswal mattiaswal force-pushed the confd-refactor-callbacks branch 3 times, most recently from 2966084 to fd926f5 Compare October 30, 2025 09:31
…upgrade resides)

To verify the bootorder is still valid after that part of the suite has run.
Sysrepo only care about model changes, but we want the system
configuration. Therefore add a common callback for all modules
and handle dependencies between the modules, if someone should be
run before another for example.
@mattiaswal mattiaswal force-pushed the confd-refactor-callbacks branch from fd926f5 to 4a59028 Compare October 30, 2025 11:28
@mattiaswal mattiaswal requested review from troglobit and wkz October 30, 2025 11:29
@mattiaswal mattiaswal marked this pull request as ready for review October 30, 2025 11:29
Copy link
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Amazing work on this! I only have a couple of comments, one of which I think needs your attention.

Also, considering the amount of changes in this daemon related to memory handling in particular, and C code in general, I suggest you run Coverity Scan on the branch before we consider merging it.

Sysrepo lack the functionallity for if change in model A also
should demand actions of model B. Previous we have handled this by
having callbacks for keystore changes in for example infix-services
to be able to reconfigure SSH on asymmetric key changes.

This commit instead add a pass where dependencies are found and added
to the diff.
Not needed anymore, the configuration change is sequential in change_cb.
@mattiaswal mattiaswal force-pushed the confd-refactor-callbacks branch from 4a59028 to 98b30d7 Compare October 30, 2025 12:15
@mattiaswal mattiaswal requested a review from troglobit October 30, 2025 13:31
@troglobit
Copy link
Contributor

Coverity Last Build Status: In-queue. Your build is in the queue to be analyzed. There are 93 builds ahead of it.

Copy link
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Nice work on this, very neat and clean!

We could also see Coverity Scan (eventually) didn't find anything relevant either, so this one is a GO from me! (After release plz ;-)

@troglobit troglobit merged commit ed23558 into main Oct 31, 2025
7 checks passed
@troglobit troglobit deleted the confd-refactor-callbacks branch October 31, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:main Build default defconfig, not minimal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User admin sometimes fails to be added to 'wheel' group

3 participants