Skip to content

Commit

Permalink
Fix the cluster lock acquire request timeout
Browse files Browse the repository at this point in the history
It must be longer than the time we allow the handler to wait via the
timout request option.

For a cluster lock acquire, the timeout option is 120s, so set the request
timeout to 120+10.
  • Loading branch information
cvaroqui committed Jun 11, 2020
1 parent 44d0d8d commit 95cb0ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opensvc/core/node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -3894,7 +3894,7 @@ def _daemon_lock(self, name, timeout=None, silent=False, on_error=None):
"options": {"name": name, "timeout": timeout},
},
silent=silent,
timeout=10,
timeout=timeout + 10,
)
lock_id = data.get("data", {}).get("id")
if not lock_id and on_error == "raise":
Expand Down

0 comments on commit 95cb0ac

Please sign in to comment.