Skip to content

Commit

Permalink
Merge pull request #8609 from travisn/set-filesystem-status
Browse files Browse the repository at this point in the history
ceph: Set the filesystem status when mirroring not enabled
  • Loading branch information
leseb committed Aug 30, 2021
2 parents 33558fb + 7cfae42 commit 67e3372
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/operator/ceph/file/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ func (r *ReconcileCephFilesystem) reconcile(request reconcile.Request) (reconcil
return reconcileResponse, err
}

statusUpdated := false

// Enable mirroring if needed
if r.clusterInfo.CephVersion.IsAtLeast(mirror.PeerAdditionMinVersion) {
// Disable mirroring on that filesystem if needed
Expand Down Expand Up @@ -316,6 +318,7 @@ func (r *ReconcileCephFilesystem) reconcile(request reconcile.Request) (reconcil

// Set Ready status, we are done reconciling
updateStatus(r.client, request.NamespacedName, cephv1.ConditionReady, opcontroller.GenerateStatusInfo(cephFilesystem))
statusUpdated = true

// Run go routine check for mirroring status
if !cephFilesystem.Spec.StatusCheck.Mirror.Disabled {
Expand All @@ -330,7 +333,8 @@ func (r *ReconcileCephFilesystem) reconcile(request reconcile.Request) (reconcil
}
}
}
} else {
}
if !statusUpdated {
// Set Ready status, we are done reconciling
updateStatus(r.client, request.NamespacedName, cephv1.ConditionReady, nil)
}
Expand Down

0 comments on commit 67e3372

Please sign in to comment.