core: dereference pointer before trying to compare with deepequal

Prior to this, we were comparing a pointer (the memory address) with a
struct. This was obviously always failing and returned false. We must
dereference the pointer to access the data contained at that memory
location.

Closes: https://github.com/rook/rook/issues/9544
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 5404ec13a2)
This commit is contained in:
Sébastien Han authored and mergify-bot committed 2022-01-28 10:20:40 +00:00
1 parent 4c41b5ea07
commit ce9b3ee2f2
9 files changed
+61 -12

No files matched your search

+1 -1
View File
@@ -312,7 +312,7 @@ func (r *ReconcileCephObjectStore) reconcile(request reconcile.Request) (reconci
// If the version of the Ceph monitor differs from the CephCluster CR image version we assume
// the cluster is being upgraded. So the controller will just wait for the upgrade to finish and
// then versions should match. Obviously using the cmd reporter job adds up to the deployment time
if !reflect.DeepEqual(runningCephVersion, desiredCephVersion) {
if !reflect.DeepEqual(*runningCephVersion, *desiredCephVersion) {
// Upgrade is in progress, let's wait for the mons to be done
return opcontroller.WaitForRequeueIfCephClusterIsUpgrading,
cephObjectStore,