Avoid raise/handle deadlocks
Can cause log flooding in some edge cases and isn't really needed any longer. Use a proper conditional followed by an actual error handler.
This commit is contained in:
parent
096bcdfd75
commit
5942aa50fc
|
@ -661,8 +661,6 @@ def node_keepalive(logger, config, zkhandler, this_node):
|
|||
zkhandler.read("base.config.migration_target_selector")
|
||||
!= config["migration_target_selector"]
|
||||
):
|
||||
raise
|
||||
except Exception:
|
||||
zkhandler.write(
|
||||
[
|
||||
(
|
||||
|
@ -671,6 +669,12 @@ def node_keepalive(logger, config, zkhandler, this_node):
|
|||
)
|
||||
]
|
||||
)
|
||||
except Exception:
|
||||
logger.out(
|
||||
"Failed to set migration target selector in Zookeeper",
|
||||
state="e",
|
||||
prefix="main-thread",
|
||||
)
|
||||
|
||||
# Set the upstream IP in Zookeeper for clients to read
|
||||
if config["enable_networking"]:
|
||||
|
@ -680,11 +684,15 @@ def node_keepalive(logger, config, zkhandler, this_node):
|
|||
zkhandler.read("base.config.upstream_ip")
|
||||
!= config["upstream_floating_ip"]
|
||||
):
|
||||
raise
|
||||
except Exception:
|
||||
zkhandler.write(
|
||||
[("base.config.upstream_ip", config["upstream_floating_ip"])]
|
||||
)
|
||||
except Exception:
|
||||
logger.out(
|
||||
"Failed to set upstream floating IP in Zookeeper",
|
||||
state="e",
|
||||
prefix="main-thread",
|
||||
)
|
||||
|
||||
# Get past state and update if needed
|
||||
if debug:
|
||||
|
|
Loading…
Reference in New Issue