diff --git a/controllers/openstackdataplanenodeset_controller.go b/controllers/openstackdataplanenodeset_controller.go index 00dc8ec58..641592f41 100644 --- a/controllers/openstackdataplanenodeset_controller.go +++ b/controllers/openstackdataplanenodeset_controller.go @@ -413,10 +413,13 @@ func checkDeployment(helper *helper.Helper, instance.Status.DeploymentStatuses = make(map[string]condition.Conditions) } instance.Status.DeploymentStatuses[deployment.Name] = deploymentConditions + if condition.IsError(deployment.Status.Conditions.Get(condition.ReadyCondition)) { + err = fmt.Errorf("check deploymentStatuses for more details") + } } } - return deploymentExists, isDeploymentReady, nil + return deploymentExists, isDeploymentReady, err } // SetupWithManager sets up the controller with the Manager. diff --git a/tests/kuttl/tests/dataplane-deploy-no-nodes-test/05-assert.yaml b/tests/kuttl/tests/dataplane-deploy-no-nodes-test/05-assert.yaml index 9f2f61ba8..be1e6591d 100644 --- a/tests/kuttl/tests/dataplane-deploy-no-nodes-test/05-assert.yaml +++ b/tests/kuttl/tests/dataplane-deploy-no-nodes-test/05-assert.yaml @@ -28,12 +28,14 @@ spec: ansibleSSHPrivateKeySecret: dataplane-ansible-ssh-private-key-secret status: conditions: - - message: Deployment in progress - reason: Requested + - message: Deployment error occurred check deploymentStatuses for more details + reason: Error + severity: Error status: "False" type: Ready - - message: Deployment in progress - reason: Requested + - message: Deployment error occurred check deploymentStatuses for more details + reason: Error + severity: Error status: "False" type: DeploymentReady - message: Input data complete