From 251dfc43e07e095d73c78c048f27100019344f9d Mon Sep 17 00:00:00 2001 From: oliashish Date: Wed, 28 Jan 2026 09:34:02 -0500 Subject: [PATCH] Fix: Warn users when NodeSet updates won't take effect due to failed deployment When an OpenStackDataPlaneDeployment fails, the inventory secret is not regenerated even if the user updates the NodeSet configuration. This left users unaware that their changes wouldn't take effect until the failed deployment was deleted. Add a webhook warning that informs users when they update a NodeSet that has a failed deployment, explaining that inventory changes will not take effect until the failed deployment is deleted. --- .../v1beta1/openstackdataplanenodeset_webhook.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/api/dataplane/v1beta1/openstackdataplanenodeset_webhook.go b/api/dataplane/v1beta1/openstackdataplanenodeset_webhook.go index 4a3db4537..60051f3cc 100644 --- a/api/dataplane/v1beta1/openstackdataplanenodeset_webhook.go +++ b/api/dataplane/v1beta1/openstackdataplanenodeset_webhook.go @@ -161,6 +161,9 @@ func (r *OpenStackDataPlaneNodeSet) ValidateUpdate(ctx context.Context, old runt ) } + + var warnings []string + if oldNodeSet.Status.DeploymentStatuses != nil { for deployName, deployConditions := range oldNodeSet.Status.DeploymentStatuses { deployCondition := deployConditions.Get(NodeSetDeploymentReadyCondition) @@ -172,10 +175,19 @@ func (r *OpenStackDataPlaneNodeSet) ValidateUpdate(ctx context.Context, old runt deployName, string(deployCondition.Type)), ) } + + // Warn user that a failed deployment blocks inventory updates. + // NodeSet changes won't take effect until the failed deployment is deleted. + if !deployConditions.IsTrue(NodeSetDeploymentReadyCondition) && condition.IsError(deployCondition) { + warnings = append(warnings, fmt.Sprintf( + "NodeSet has been updated, but OpenStackDataPlaneDeployment %s is in a failed state. "+ + "Inventory changes will not take effect until this deployment is deleted.", + deployName)) + } } } - return nil, nil + return warnings, nil } // ValidateUpdate validates the OpenStackDataPlaneNodeSetSpec on update