Description of problem: Image creation fail in case the operator can't find the pull-secret, The error message on infra-env isn't indicating what is the problem: | Failed to create image: record not found Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create the following: BMH pull-secret infra-env agent-cluster-install cluster-deployment 2. describe infraenv Actual results: │ Status: │ │ Conditions: │ │ Last Transition Time: 2021-06-08T10:36:12Z │ │ Message: Failed to create image: record not found │ │ Reason: ImageCreationError │ │ Status: Unknown │ │ Type: ImageCreated service logs: time="2021-06-08T10:37:28Z" level=error msg="failed to get pull secret" func="github.com/openshift/assisted-service/internal/controller/controllers.(*ClusterDeploymentsReconciler).createNewCluster" file="/go/src/github.com/openshift/origin/internal/controller/controllers/clusterdeployments_controller.go:783" agent_cluster_install=test-agent-cluster-install agent_cluster_install_namespace=assisted-installer-not cluster_deployment=single-node cluster_deployment_namespace=assisted-installer-not error="failed to get pull secret assisted-installer-not/pull-secret: Secret \"pull-secret\" not found" go-id=593 request_id=7ded2ca2-0a3e-4d45-8008-1c87a9184454 Expected results: A message saying that the image creation failed due to missing pull secret Additional info:
This seems to be handled by https://github.com/openshift/assisted-service/pull/2027 Creating all resources and inspecting: 1. infraEnv conditions: conditions: - lastTransitionTime: "2021-06-27T12:21:30Z" message: 'Failed to create image: cluster does not exist: single-node, check AgentClusterInstall conditions: &{Group:extensions.hive.openshift.io Version:v1beta1 Kind:AgentClusterInstall Name:test-agent-cluster-install}' reason: ImageCreationError status: Unknown type: ImageCreated 2. agentClusterInstall conditions: conditions: - lastProbeTime: "2021-06-27T12:20:53Z" lastTransitionTime: "2021-06-27T12:20:53Z" message: 'The Spec could not be synced due to backend error: failed to get pull secret assisted-installer/pull-secret: Secret "pull-secret" not found' However, I did notice a minor formatting issue with InfraEnv, as shown above. Fixed it here: https://github.com/openshift/assisted-service/pull/2109 Both https://github.com/openshift/assisted-service/pull/2027 and https://github.com/openshift/assisted-service/pull/2109 will get backported to ocm-2.3
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:3759