Page MenuHomeVyOS Platform

config-mgmt: the post-commit hook builds the full config twice to write one archive copy
Open, NormalPublicBUG

Description

After every commit, the post-commit hook 01vyos-commit-revision spends time that grows with the size of the config, independent of what the commit changed. On a VyOS 1.5.1 VM with a 10,000-rule prefix-list, removing the extra reads shortened each of three commits by 77–78 s (about 256 s → 178 s).

Root cause.

  • config_mgmt.run() builds ConfigMgmt(), which builds a full Config(): it reads and parses the active config and the working config. The working config is read through the commit session's unionfs-fuse mount, which takes seconds on a large config.
  • To write the archive copy (/config/archive/config.boot and config.json), the hook then starts vyos-save-config.py, which builds another full Config() of the same content.
  • The hooks run after the commit has written the active config, so after a successful commit one read of the active config is enough for both.

Fix direction. Read the committed config once from the active store and write the archive copy from that tree.

Details

Version
1.4.5, 1.5.1, rolling-2026-10-02
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)