diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-08-24 19:26:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 19:26:20 +0200 |
commit | e6bae7dc112013d6a557c7e15cecf72ab3d39a48 (patch) | |
tree | 2ea838a75ec5228af54bf174cb7b4e4bf39e029c /src | |
parent | 04096a1abc98d57b1ee5d6eb8b5904988bee69ff (diff) | |
parent | ed5fb0645367e4bd099fe12decbb515af1e6dcc6 (diff) | |
download | vyos-1x-e6bae7dc112013d6a557c7e15cecf72ab3d39a48.tar.gz vyos-1x-e6bae7dc112013d6a557c7e15cecf72ab3d39a48.zip |
Merge pull request #1486 from roedie/T4526-2
keepalived: T4526: keepalived-fifo.py unable to load config
Diffstat (limited to 'src')
-rwxr-xr-x | src/system/keepalived-fifo.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/system/keepalived-fifo.py b/src/system/keepalived-fifo.py index a8df232ae..a0fccd1d0 100755 --- a/src/system/keepalived-fifo.py +++ b/src/system/keepalived-fifo.py @@ -30,6 +30,7 @@ from vyos.ifconfig.vrrp import VRRP from vyos.configquery import ConfigTreeQuery from vyos.util import cmd from vyos.util import dict_search +from vyos.util import commit_in_progress # configure logging logger = logging.getLogger(__name__) @@ -63,6 +64,17 @@ class KeepalivedFifo: # load configuration def _config_load(self): + # For VRRP configuration to be read, the commit must be finished + count = 1 + while commit_in_progress(): + if ( count <= 40 ): + logger.debug(f'commit in progress try: {count}') + else: + logger.error(f'commit still in progress after {count} continuing anyway') + break + count += 1 + time.sleep(0.5) + try: base = ['high-availability', 'vrrp'] conf = ConfigTreeQuery() |