diff options
| author | Alex Kudentsov <43482574+alexk37@users.noreply.github.com> | 2026-10-02 14:46:50 +0700 |
|---|---|---|
| committer | Alex Kudentsov <43482574+alexk37@users.noreply.github.com> | 2026-10-05 16:54:22 +0700 |
| commit | b8c9a8e59310fcaa93ce4921a558f9853c606403 (patch) | |
| tree | 4d0ef693193ff08129bec7ef509d0b45784baa67 /interface-definitions/include/source-interface-ethernet.xml.i | |
| parent | fce6b4074f85a8112ba4de64bf2cee94eab704cd (diff) | |
| download | vyos-1x-b8c9a8e59310fcaa93ce4921a558f9853c606403.tar.gz vyos-1x-b8c9a8e59310fcaa93ce4921a558f9853c606403.zip | |
config-mgmt: T9399: read the committed config once in the post-commit hooks
01vyos-commit-revision built a full Config() in ConfigMgmt() (active and
working config, the working one read through the session's unionfs-fuse)
and then ran vyos-save-config.py, which built a second full Config() to
write the same active config out. On a config with a 2,000-entry
prefix-list the hook took 17 s of every commit.
The hooks run after the active config has been written, so read it once
from the active store, and write the archive copy and config.json from the
tree already held. The read is made as ConfigSourceSession makes it
(stdout only, unmodified), and as there, no running config is passed
until the boot configuration is complete, so the boot commit's hooks see
no effective values and 02vyos-commit-archive uploads nothing at boot.
After a commit that does not end in COMMIT_STATUS=SUCCESS (PARTIAL in
the tests; a conf_mode script failure gives PARTIAL, and FAILURE takes
the same branch) the hooks read the config the stock way (a full Config()
of the working config); only the archive copy is still written from that
tree in-process instead of by vyos-save-config.py.
vyatta-cfg's discard removes the session's changes underneath the
unionfs-fuse mount, and a set within about a second of it fails while the
kernel still caches the removed directories; the stock hook takes longer
than that and so hides it. A faster hook after a failed commit made
smoketest test_bgp_27_route_reflector_client fail; on stock it fails the
same way with 01vyos-commit-revision removed.
confirm and initialize_revision use the same archive helper, so they also
write the archive copy from the tree already held instead of starting
vyos-save-config.py.
Diffstat (limited to 'interface-definitions/include/source-interface-ethernet.xml.i')
0 files changed, 0 insertions, 0 deletions
