mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
reconnect: Add ability to do a number of retries without backoff.
This is aimed at an upcoming database clustering implementation, where it's desirable to try all of the cluster members quickly before backing off to retry them again in sequence. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
@@ -104,6 +104,10 @@ def do_set_max_tries(arg):
|
||||
r.set_max_tries(int(arg))
|
||||
|
||||
|
||||
def do_set_backoff_free_tries(arg):
|
||||
r.set_backoff_free_tries(int(arg))
|
||||
|
||||
|
||||
def diff_stats(old, new, delta):
|
||||
if (old.state != new.state or
|
||||
old.state_elapsed != new.state_elapsed or
|
||||
@@ -173,6 +177,7 @@ def main():
|
||||
"advance": do_advance,
|
||||
"timeout": do_timeout,
|
||||
"set-max-tries": do_set_max_tries,
|
||||
"set-backoff-free-tries": do_set_backoff_free_tries,
|
||||
"passive": do_set_passive,
|
||||
"listening": do_listening,
|
||||
"listen-error": do_listen_error
|
||||
|
Reference in New Issue
Block a user