diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-08 10:03:43 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-08 10:06:13 +0100 |
commit | f168e409acb314d1c15a4343643be7c07ce79b44 (patch) | |
tree | 243dd21b9548e26432b910242614733cae3d3b43 /src | |
parent | 854cbc87eeee45d6d53320c6d9a0dcf74920ceb9 (diff) | |
download | vyos-1x-f168e409acb314d1c15a4343643be7c07ce79b44.tar.gz vyos-1x-f168e409acb314d1c15a4343643be7c07ce79b44.zip |
vrrp: T4059: do "late" read of the CLI configuration as this fails in __init__
... thus we simply read the configuration the first time it really becomes
necessary and a message requireing the data needs it actually.
(cherry picked from commit bcfe967f607a83192d75c01e7f414655891eec60)
Diffstat (limited to 'src')
-rwxr-xr-x | src/system/keepalived-fifo.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/system/keepalived-fifo.py b/src/system/keepalived-fifo.py index b1fe7e43f..cde0c6cc5 100755 --- a/src/system/keepalived-fifo.py +++ b/src/system/keepalived-fifo.py @@ -53,7 +53,7 @@ class KeepalivedFifo: # parse arguments cmd_args = cmd_args_parser.parse_args() - self._config_load() + self.vrrp_config_dict = None self.pipe_path = cmd_args.PIPE # create queue for messages and events for syncronization @@ -97,6 +97,11 @@ class KeepalivedFifo: logger.debug('Message processing start') regex_notify = re.compile(r'^(?P<type>\w+) "(?P<name>[\w-]+)" (?P<state>\w+) (?P<priority>\d+)$', re.MULTILINE) while self.stopme.is_set() is False: + # XXX: T4059 - do a "late" read of the CLI configuration as this would fail in __init__. + # Thus we simply read the configuration the first time it really becomes necessary + # and a message requireing the data needs it actually. + if self.vrrp_config_dict == None: + self._config_load() # wait for a new message event from pipe_wait self.message_event.wait() try: |