From 1ff7604f820481ddb1ca30edd14eada652c2f81b Mon Sep 17 00:00:00 2001 From: Santosh Pillai Date: Tue, 16 Sep 2025 12:57:12 +0530 Subject: [PATCH] core: use updated context in prevalidaiton checks If the CephCluster spec is updated before the prevalidation check, then Cluster.context still refers to the cancelled context of the operator. This PR just updates the cluster context to use the latest operator context. Signed-off-by: Santosh Pillai --- pkg/operator/ceph/cluster/cluster.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/operator/ceph/cluster/cluster.go b/pkg/operator/ceph/cluster/cluster.go index e3bbaea74..f8f2f1851 100755 --- a/pkg/operator/ceph/cluster/cluster.go +++ b/pkg/operator/ceph/cluster/cluster.go @@ -264,6 +264,7 @@ func (c *ClusterController) initializeCluster(cluster *cluster) error { } func (c *ClusterController) configureLocalCephCluster(cluster *cluster) error { + cluster.ClusterInfo.Context = c.OpManagerCtx // Cluster Spec validation err := preClusterStartValidation(cluster) if err != nil { @@ -287,8 +288,6 @@ func (c *ClusterController) configureLocalCephCluster(cluster *cluster) error { } controller.UpdateCondition(c.OpManagerCtx, c.context, c.namespacedName, k8sutil.ObservedGenerationNotAvailable, cephv1.ConditionProgressing, v1.ConditionTrue, cephv1.ClusterProgressingReason, "Configuring the Ceph cluster") - - cluster.ClusterInfo.Context = c.OpManagerCtx // Run the orchestration err = cluster.reconcileCephDaemons(c.rookImage, *cephVersion) if err != nil {