From 3e7699bc14d7f6ae19ce06665ff2da0b51384076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 3 Nov 2021 17:36:57 +0100 Subject: [PATCH] mirror: use a sorted list for peer token content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The monitor list was not sorted, so each time we were reconciling, the peer secret token will see its content updated with randomized monitors. This would enter our predicate and trigger a reconcile. Potentially an endless one, if the randomized list is already different. Closes: https://github.com/rook/rook/issues/9076 Signed-off-by: Sébastien Han --- pkg/daemon/ceph/client/mirror.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/daemon/ceph/client/mirror.go b/pkg/daemon/ceph/client/mirror.go index c0630dc46770e..e992d6622d504 100644 --- a/pkg/daemon/ceph/client/mirror.go +++ b/pkg/daemon/ceph/client/mirror.go @@ -371,7 +371,7 @@ func CreateRBDMirrorBootstrapPeerWithoutPool(context *clusterd.Context, clusterI ClusterFSID: clusterInfo.FSID, ClientID: rbdMirrorPeerKeyringID, Key: key, - MonHost: strings.Join(mons.UnsortedList(), ","), + MonHost: strings.Join(mons.List(), ","), Namespace: clusterInfo.Namespace, }