From 0c48b27d0fe4e127e58551028ececb4fc1b44186 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 29 Oct 2024 16:34:39 +0100 Subject: [PATCH] rbd: log the watchers if there are too many Signed-off-by: Niels de Vos --- internal/rbd/rbd_util.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index fbae7f4181d..59eb2152034 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -578,6 +578,10 @@ func (ri *rbdImage) isInUse() (bool, error) { defaultWatchers += count } + if len(watchers) > defaultWatchers { + log.ErrorLogMsg("too many watchers (%d > %d): %v", len(watchers), defaultWatchers, watchers) + } + return len(watchers) > defaultWatchers, nil }