From 996a88f902e5ca209fdd7f388f69748832f5a278 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Mon, 25 Nov 2024 17:02:03 +0530 Subject: [PATCH] rbdmirror: rbd import cmd stuck forever if the import from the peer cluster doesnt work, because of some reasons like cluster health, network, etc the import cmd stuck forever and which forever stucks the blockppol reconcile Signed-off-by: parth-gr --- pkg/daemon/ceph/client/mirror.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/daemon/ceph/client/mirror.go b/pkg/daemon/ceph/client/mirror.go index a37a95d87..d9c2dc8a8 100644 --- a/pkg/daemon/ceph/client/mirror.go +++ b/pkg/daemon/ceph/client/mirror.go @@ -27,6 +27,7 @@ import ( cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1" "github.com/rook/rook/pkg/clusterd" cephver "github.com/rook/rook/pkg/operator/ceph/version" + "github.com/rook/rook/pkg/util/exec" "k8s.io/apimachinery/pkg/util/sets" ) @@ -87,7 +88,7 @@ func ImportRBDMirrorBootstrapPeer(context *clusterd.Context, clusterInfo *Cluste cmd := NewRBDCommand(context, clusterInfo, args) // Run command - output, err := cmd.Run() + output, err := cmd.RunWithTimeout(exec.CephCommandsTimeout) if err != nil { return errors.Wrapf(err, "failed to add rbd-mirror peer token for pool %q. %s", poolName, output) }