mgr: honor the ContinueUpgradeAfterChecksEvenIfNotHealthy flag

Fixes: #13167

Previously, the mgr did not honor the flag
ContinueUpgradeAfterChecksEvenIfNotHealthy
from the cluster spec. Only osd, mds, and rgw did.

To render the update behavior correct and complete across the daemons, this
change implements the honoring of the flag for the mgr.

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 93bf6540b2)
This commit is contained in:
Michael Adam authored and Mergify committed 2023-11-30 16:59:37 +00:00
1 parent 969fe3f4c8
commit 8cd09ecd39
1 file changed
+7 -2
+7 -2
View File
@@ -150,9 +150,14 @@ func (c *Cluster) Start() error {
return errors.Wrapf(err, "failed to create mgr deployment %s", resourceName)
}
logger.Infof("deployment for mgr %s already exists. updating if needed", resourceName)
if err := updateDeploymentAndWait(c.context, c.clusterInfo, d, config.MgrType, mgrConfig.DaemonID, c.spec.SkipUpgradeChecks, false); err != nil {
if err := updateDeploymentAndWait(c.context, c.clusterInfo, d, config.MgrType, mgrConfig.DaemonID, c.spec.SkipUpgradeChecks, c.spec.ContinueUpgradeAfterChecksEvenIfNotHealthy); err != nil {
logger.Errorf("failed to update mgr deployment %q. %v", resourceName, err)
if c.spec.ContinueUpgradeAfterChecksEvenIfNotHealthy {
logger.Infof("continuing reconcile of ceph cluster in namespace %s after error waiting for mgr because continueUpgradeAfterChecksEvenIfNotHealthy is true", c.clusterInfo.Namespace)
} else {
logger.Infof("stopping reconcile of ceph cluster in namespace %s after error waiting for mgr because continueUpgradeAfterChecksEvenIfNotHealthy is false", c.clusterInfo.Namespace)
return errors.Wrapf(err, "failed to update mgr deployment %q", resourceName)
}
}
} else {
// wait for the new deployment