diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-10-31 13:04:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 13:04:56 +0100 |
commit | 50a17269c0b6d499df6ea17385a369bfdb819665 (patch) | |
tree | b1fcdf8de0d78d40f29257b81a6387ab8db7ea1d | |
parent | d5e512bec8b7b3a8dd3aa4952513504c3c87f291 (diff) | |
parent | 82425099edcc48494193b00138775a8da4e70023 (diff) | |
download | vyos-1x-50a17269c0b6d499df6ea17385a369bfdb819665.tar.gz vyos-1x-50a17269c0b6d499df6ea17385a369bfdb819665.zip |
Merge pull request #1630 from roedie/1.3-T4526
keepalived: T4526: keepalived-fifo.py unable to load config
-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() |