Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sambacc: avoid logging an error if cluster is being torn down #131

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sambacc/ctdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,13 @@ def monitor_cluster_meta_changes(
if curr_meta == prev_meta:
_logger.debug("cluster meta content unchanged: %r", curr_meta)
continue
if len(prev_meta) > 0 and len(curr_meta) == 0:
# cluster is possibly (probably?) being destroyed.
# Return from this loop and let the command-level loop decide if
# this function needs to be restarted or not. There's a chance this
# process will be terminated very soon anyway.
_logger.warning("no current nodes available")
return
_logger.info("cluster meta content changed")
_logger.debug(
"cluster meta: previous=%r current=%r", prev_meta, curr_meta
Expand Down
Loading