Skip to content

Conversation

@Fredi-raspall
Copy link
Contributor

@Fredi-raspall Fredi-raspall commented Jan 8, 2026

This goes on top of #1165

Summary:

  • simplify config db to keep only one config (the one applied)
  • the config db also keeps a "history" of configs applied
2026-01-08T16:58:03.214658Z  INFO                     mgmt dataplane_mgmt::processor::proc: 133: 
 ───────────────────────────── Configuration history  ─────────────────────────────
 current generation: 4
  GenId created                   applied                   error
      1 16:57:51 on 2026/01/08    16:57:53 on 2026/01/08    none
      2 16:57:54 on 2026/01/08    16:57:56 on 2026/01/08    none
      3 16:57:57 on 2026/01/08    16:57:58 on 2026/01/08    Internal error: Unable to find kernel interface 'eth0'
      4 16:58:01 on 2026/01/08    16:58:03 on 2026/01/08    none

Currently, we only log it.

Note: if we don't attempt to apply a config (because we invalidate it earlier), that will not be shown in the history atm.
This is because our validations are scattered between the converters. Will address this in next PRs.

@Fredi-raspall Fredi-raspall requested a review from a team as a code owner January 8, 2026 16:57
@Fredi-raspall Fredi-raspall requested review from sergeymatov and removed request for a team January 8, 2026 16:57
@Fredi-raspall Fredi-raspall force-pushed the pr/fredi/mgmt-cleanup-2-config-db branch from dbfa537 to 2df0091 Compare January 8, 2026 17:22
@Fredi-raspall Fredi-raspall force-pushed the pr/fredi/mgmt-cleanup-2-config-db branch from 2df0091 to 23244f2 Compare January 8, 2026 19:11
Base automatically changed from pr/fredi/remove_grpc to main January 8, 2026 20:54
Simplifies the configuration database to a minimal one that:
 - stores a single config (the one being applied).
 - keeps a history of config changes.

Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
Make apply_gw_config() a method of the ConfigProcessor.

Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
@Fredi-raspall Fredi-raspall force-pushed the pr/fredi/mgmt-cleanup-2-config-db branch from 23244f2 to 8b59bae Compare January 9, 2026 11:10
Build an internal config for a GwConfig if it does not have it.
This should only happen if we roll back to a blank config.
We don't build the internal config for a blank config upfront
nor try to apply it. We only try to apply such a config if the
first config to be applied fails, as a means to clean up.

This behavior can be trivially changed by not storing a blank
config in the config database.

Signed-off-by: Fredi Raspall <fredi@githedgehog.com>
@Fredi-raspall Fredi-raspall force-pushed the pr/fredi/mgmt-cleanup-2-config-db branch from 8b59bae to 237a7ff Compare January 9, 2026 11:12
@Fredi-raspall Fredi-raspall added this pull request to the merge queue Jan 9, 2026
Merged via the queue into main with commit caddb47 Jan 9, 2026
22 checks passed
@Fredi-raspall Fredi-raspall deleted the pr/fredi/mgmt-cleanup-2-config-db branch January 9, 2026 15:24
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