From 6cfe02e0e3c1ed94055f36fb7a9a5ae4e681db79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 9 Feb 2022 15:36:06 +0100 Subject: [PATCH] core: do not dereference a non-pointer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In this case `oldMappingToGo` and `newMappingToGo` were not pointers so there is nothing to dereference. This happens when the monitors endpoints configmap is updated, but only on the pool and file controllers. They are watching for changes on that configmap so that they can reconcile and upate the bootstrap peers token when replication is enabled. Closes: https://github.com/rook/rook/issues/9714 Signed-off-by: Sébastien Han (cherry picked from commit 32998cbda4291e414be363d5f7ccb7fe9ec7c933) --- pkg/operator/ceph/cluster/mon/predicate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/operator/ceph/cluster/mon/predicate.go b/pkg/operator/ceph/cluster/mon/predicate.go index 9a71666fe..b858973ce 100644 --- a/pkg/operator/ceph/cluster/mon/predicate.go +++ b/pkg/operator/ceph/cluster/mon/predicate.go @@ -96,7 +96,7 @@ func wereMonEndpointsUpdated(oldCMData, newCMData map[string]string) bool { // Iterate over the map and compare the values for _, v := range oldKeys { - if !reflect.DeepEqual(*oldMappingToGo.Schedule[v], *newMappingToGo.Schedule[v]) { + if !reflect.DeepEqual(oldMappingToGo.Schedule[v], newMappingToGo.Schedule[v]) { logger.Debugf("oldMappingToGo.Schedule[v] AND newMappingToGo.Schedule[v]: %v | %v", oldMappingToGo.Schedule[v], newMappingToGo.Schedule[v]) return true }