core: skip ceph upgrade check in external cluster

Closes: rook#10688
Signed-off-by: Joseph Lee <joseph@jc-lab.net>
(cherry picked from commit 9639b60fc4)
This commit is contained in:
Joseph Lee authored and Mergify committed 2022-08-11 17:36:23 +00:00
1 parent 78444d21e3
commit 190017f6d0
5 files changed
+10 -5

No files matched your search

+2 -1
View File
@@ -214,7 +214,8 @@ func (r *ReconcileCephRBDMirror) reconcile(request reconcile.Request) (reconcile
// 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) {
// Skip waiting for upgrades to finish in case of external cluster.
if !cephCluster.Spec.External.Enable && !reflect.DeepEqual(*runningCephVersion, *desiredCephVersion) {
// Upgrade is in progress, let's wait for the mons to be done
return opcontroller.WaitForRequeueIfCephClusterIsUpgrading, *cephRBDMirror,
opcontroller.ErrorCephUpgradingRequeue(desiredCephVersion, runningCephVersion)
+2 -1
View File
@@ -306,7 +306,8 @@ func (r *ReconcileCephFilesystem) reconcile(request reconcile.Request) (reconcil
// 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) {
// Skip waiting for upgrades to finish in case of external cluster.
if !cephCluster.Spec.External.Enable && !reflect.DeepEqual(*runningCephVersion, *desiredCephVersion) {
// Upgrade is in progress, let's wait for the mons to be done
return opcontroller.WaitForRequeueIfCephClusterIsUpgrading, *cephFilesystem,
opcontroller.ErrorCephUpgradingRequeue(desiredCephVersion, runningCephVersion)
+2 -1
View File
@@ -204,7 +204,8 @@ func (r *ReconcileFilesystemMirror) reconcile(request reconcile.Request) (reconc
// 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) {
// Skip waiting for upgrades to finish in case of external cluster.
if !cephCluster.Spec.External.Enable && !reflect.DeepEqual(*runningCephVersion, *desiredCephVersion) {
// Upgrade is in progress, let's wait for the mons to be done
return opcontroller.WaitForRequeueIfCephClusterIsUpgrading, *filesystemMirror,
opcontroller.ErrorCephUpgradingRequeue(desiredCephVersion, runningCephVersion)
+2 -1
View File
@@ -251,7 +251,8 @@ func (r *ReconcileCephNFS) reconcile(request reconcile.Request) (reconcile.Resul
// 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) {
// Skip waiting for upgrades to finish in case of external cluster.
if !cephCluster.Spec.External.Enable && !reflect.DeepEqual(*runningCephVersion, *desiredCephVersion) {
// Upgrade is in progress, let's wait for the mons to be done
return opcontroller.WaitForRequeueIfCephClusterIsUpgrading, *cephNFS,
opcontroller.ErrorCephUpgradingRequeue(desiredCephVersion, runningCephVersion)
+2 -1
View File
@@ -324,7 +324,8 @@ 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) {
// Skip waiting for upgrades to finish in case of external cluster.
if !cephCluster.Spec.External.Enable && !reflect.DeepEqual(*runningCephVersion, *desiredCephVersion) {
// Upgrade is in progress, let's wait for the mons to be done
return opcontroller.WaitForRequeueIfCephClusterIsUpgrading,
*cephObjectStore,