Skip to content

Commit 707e66a

Browse files
stuggiclaude
andcommitted
Fix OpenStackVersion minor update workflow hanging on OVN dataplane check
During a minor update, the OpenStackVersion controller was getting stuck with incorrect condition states even after deployments completed: - MinorUpdateOVNDataplane: "in progress" (stuck) - MinorUpdateControlplane: "not started" (never executed) Root Cause: The DataplaneNodesetsOVNControllerImagesMatch function checked nodeset.IsReady(), which failed when subsequent deployments (e.g., edpm-update) started running. This caused the function to return false even though the OVN update deployment (edpm-ovn-update) had already completed successfully. The nodeset's overall Ready status was False because edpm-update was running, blocking the minor update workflow from progressing to the next steps (RabbitMQ, MariaDB, controlplane services, etc.). Solution: Remove the nodeset.IsReady() check from DataplaneNodesetsOVNControllerImagesMatch. The nodeset's Status.ContainerImages["OvnControllerImage"] is only updated when a deployment completes successfully (openstackdataplanenodeset_controller.go:598-600). Therefore, if the OVN image matches the target version, the OVN update deployment has already completed, regardless of the nodeset's overall Ready status. Why we can't check deployment-specific conditions: The nodeset stores deployment conditions in Status.DeploymentStatuses map, keyed by deployment name (e.g., "edpm-ovn-update"). However, deployment names are dynamic and not known at this point in the code, making it impossible to check specific deployment conditions directly. Note: The final DataplaneNodesetsDeployed check still uses nodeset.IsReady() because it validates the completion of the entire minor update workflow, where we do want to ensure the nodeset is fully ready. Jira: OSPRH-25860 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent 5de8798 commit 707e66a

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

internal/openstack/dataplane.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ func DataplaneNodesetsOVNControllerImagesMatch(version *corev1beta1.OpenStackVer
4545
// the current nodeset spec), we only check nodesets if they have any nodes
4646
// and have deployed OVN
4747
if len(nodeset.Spec.Nodes) > 0 && nodeset.Status.ContainerImages["OvnControllerImage"] != "" {
48-
if !nodeset.IsReady() {
49-
return false
50-
}
48+
// Check if OVN controller image matches the target version.
49+
// Note: We don't check nodeset.IsReady() here because this is an intermediate
50+
// step in the minor update workflow. The nodeset's Status.ContainerImages is only
51+
// updated when a deployment completes successfully (see openstackdataplanenodeset_controller.go:598-600).
52+
// The nodeset might be not-Ready due to subsequent deployments running (e.g., edpm-update),
53+
// but if the OVN image matches, it means the OVN update deployment already completed.
54+
//
55+
// We cannot check the specific deployment condition (e.g., DeploymentStatuses["edpm-ovn-update"])
56+
// because the deployment name is dynamic and not known at this point. The DeploymentStatuses
57+
// map uses the actual deployment name as the key, which varies based on the deployment CR name.
5158
if nodeset.Status.ContainerImages["OvnControllerImage"] != *version.Status.ContainerImages.OvnControllerImage {
5259
return false
5360
}

0 commit comments

Comments
 (0)