Some scripts, like the dhclient script, need to access the running config from outside the normal CLI and assume that the values are up to date.
When such scripts are triggered from config scripts, there's a good chance of a race condition: if they try to get values until commit completes, they will get incorrect results.
Old scripts used returnOrigValue and similar, which meant they were intentionally getting outdated results.
A correct way to do that would be to check if a commit is still in progress and wait until it completes.
if vyos.util.commit_in_progress(): print("Commit in progress!") vyos.util.wait_for_commit_lock() print("Commit is no longer in progress")