From 5520ee35bb4d6ca442cc5dde78466924f70088cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 5 Jun 2020 15:06:35 +0200 Subject: [PATCH] ceph: check if ok-to-stop even on failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Even if we cannot determine wheter all the OSDs are running on the host, we still need to perform the ok-to-stop check. It is far more common to have more than 3 OSDs anyways. Signed-off-by: Sébastien Han --- pkg/daemon/ceph/client/upgrade.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/daemon/ceph/client/upgrade.go b/pkg/daemon/ceph/client/upgrade.go index 117704b32..a3928688d 100644 --- a/pkg/daemon/ceph/client/upgrade.go +++ b/pkg/daemon/ceph/client/upgrade.go @@ -390,10 +390,9 @@ func osdDoNothing(context *clusterd.Context, clusterName string) bool { // aio means all in one aio, err := allOSDsSameHost(context, clusterName) if err != nil { - // That's tricky, we are about to perform an update so it's difficult to break the update for this - // let's consider this is not a problem but log what happened - logger.Warningf("not able to determine if all OSDs are running on the same host, not performing upgrade check, running in best-effort") - return true + // If calling osd list fails, we assume there are more than 3 OSDs and we check if ok-to-stop + logger.Warningf("failed to determine if all osds are running on the same host, performing upgrade check anyways. %v", err) + return false } if aio {