diff options
Diffstat (limited to 'src/helpers/vyos-load-balancer.py')
-rwxr-xr-x | src/helpers/vyos-load-balancer.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/helpers/vyos-load-balancer.py b/src/helpers/vyos-load-balancer.py index 30329fd5c..850c5142e 100755 --- a/src/helpers/vyos-load-balancer.py +++ b/src/helpers/vyos-load-balancer.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -# Copyright 2024-2025 VyOS maintainers and contributors <maintainers@vyos.io> +# Copyright VyOS maintainers and contributors <maintainers@vyos.io> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -246,6 +246,7 @@ if __name__ == '__main__': # Main loop + init = True; try: while True: ip_change = False @@ -273,6 +274,11 @@ if __name__ == '__main__': if state_changed and state['failure_count'] >= int(health_conf['failure_count']): state['state'] = False state['state_changed'] = True + + #Force state changed to trigger the first write + if init == True: + state['state_changed'] = True + init = False if state['state_changed']: state['if_addr'] = get_ipv4_address(ifname) |