Bug 1969391 - [master] infra-env condition message isn't informative in case of missing pull secret
Summary: [master] infra-env condition message isn't informative in case of missing pul...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: assisted-installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.9.0
Assignee: Nir Magnezi
QA Contact: bjacot
URL:
Whiteboard: KNI-EDGE-JUKE-4.8 AI-Team-Hive
Depends On:
Blocks: 1972690
TreeView+ depends on / blocked
 
Reported: 2021-06-08 10:46 UTC by Eran Cohen
Modified: 2021-10-18 17:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1972690 (view as bug list)
Environment:
Last Closed: 2021-10-18 17:33:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 2109 0 None open Bug 1969391: Fix InfraEnv missing ACI msg formatting 2021-06-27 13:03:22 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:33:36 UTC

Internal Links: 1972690

Description Eran Cohen 2021-06-08 10:46:22 UTC
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:

Comment 1 Nir Magnezi 2021-06-27 13:14:25 UTC
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

Comment 6 errata-xmlrpc 2021-10-18 17:33:16 UTC
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


Note You need to log in before you can comment on or make changes to this bug.