From 063ce3a34b7dd4f210f26e9ebf4d3c6cbba4f608 Mon Sep 17 00:00:00 2001 From: Mark Old Date: Thu, 16 Jun 2022 16:35:45 -0700 Subject: [PATCH] Add SCACertPullFailed to install log regex search --- config/configmaps/install-log-regexes-configmap.yaml | 5 +++++ pkg/controller/clusterprovision/installlogmonitor_test.go | 6 ++++++ pkg/operator/assets/bindata.go | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/config/configmaps/install-log-regexes-configmap.yaml b/config/configmaps/install-log-regexes-configmap.yaml index 67b5e29a06b..6303e3e9e2f 100644 --- a/config/configmaps/install-log-regexes-configmap.yaml +++ b/config/configmaps/install-log-regexes-configmap.yaml @@ -276,6 +276,11 @@ data: - "Failed waiting for Kubernetes API. This error usually happens when there is a problem on the bootstrap host that prevents creating a temporary control plane" installFailingReason: KubeAPIWaitFailed installFailingMessage: Failed waiting for Kubernetes API. This error usually happens when there is a problem on the bootstrap host that prevents creating a temporary control plane + - name: SCACertPullFailed + searchRegexStrings: + - "Failed to pull SCA certs from" + installFailingReason: SCACertPullFailed + installFailingMessage: Failed to pull SCA certs # Keep these at the bottom so that they're only hit if nothing above matches. # We don't want to show these to users unless it's a last resort. It's barely better than "unknown error". diff --git a/pkg/controller/clusterprovision/installlogmonitor_test.go b/pkg/controller/clusterprovision/installlogmonitor_test.go index bb8bc006dd9..b4d2ca7d9b7 100644 --- a/pkg/controller/clusterprovision/installlogmonitor_test.go +++ b/pkg/controller/clusterprovision/installlogmonitor_test.go @@ -55,6 +55,7 @@ const ( route53Timeout = "level=error\nlevel=error msg=Error: error waiting for Route53 Hosted Zone (Z1234567890ACBD) creation: timeout while waiting for state to become 'INSYNC' (last state: 'PENDING', timeout: 15m0s)\nlevel=error\nlevel=error msg= on ../tmp/openshift-install-cluster-260510522/route53/base.tf line 22, in resource \"aws_route53_zone\" \"new_int\":\nlevel=error msg= 22: resource \"aws_route53_zone\" \"new_int\"" inconsistentTerraformResult = "time=\"2021-12-01T16:08:46Z\" level=error msg=\"Error: Provider produced inconsistent result after apply\"" multipleRoute53ZonesFound = "time=\"2022-03-30T06:51:12Z\" level=error msg=\"Error: multiple Route53Zone found please use vpc_id option to filter\"" + scaCertPullFailed = "msg=Cluster operator insights SCANotAvailable is True with NotFound: Failed to pull SCA certs from https://api.openshift.com/api/accounts_mgmt/v1/certificates: OCM API https://api.openshift.com/api/accounts_mgmt/v1/certificates returned HTTP 404: {\"id\":\"7\",\"kind\":\"Error\",\"href\":\"/api/accounts_mgmt/v1/errors/7\",\"code\":\"ACCT-MGMT-7\",\"reason\":\"The organization (id= whatever) does not have any certificate of type sca. Enable SCA at https://access.redhat.com/management.\",\"operation_id\":\"ce804952-8012-4f78-9d6d-a5538dc35e3a\"}\nlevel=info" // NOTE: This embedded newline matters: our regex must be able to match the two chunks of the message on separate lines. noWorkerNodesFmt = `time="2021-12-09T10:51:06Z" level=debug msg="Symlinking plugin terraform-provider-%s src: \"/usr/bin/openshift-install\" dst: \"/tmp/openshift-install-cluster-723469510/plugins/terraform-provider-%s\"" time="2021-12-09T10:53:06Z" level=error msg="blahblah. Got 0 worker nodes, 3 master nodes blah"` @@ -373,6 +374,11 @@ func TestParseInstallLog(t *testing.T) { log: pointer.StringPtr(multipleRoute53ZonesFound), expectedReason: "MultipleRoute53ZonesFound", }, + { + name: "SCACertPullFailed", + log: pointer.StringPtr(scaCertPullFailed), + expectedReason: "SCACertPullFailed", + }, { name: "AWSVPCDoesNotExist", log: pointer.StringPtr(awsInvalidVpcId), diff --git a/pkg/operator/assets/bindata.go b/pkg/operator/assets/bindata.go index 36df652835f..8f927c9e31b 100644 --- a/pkg/operator/assets/bindata.go +++ b/pkg/operator/assets/bindata.go @@ -1863,6 +1863,11 @@ data: - "Failed waiting for Kubernetes API. This error usually happens when there is a problem on the bootstrap host that prevents creating a temporary control plane" installFailingReason: KubeAPIWaitFailed installFailingMessage: Failed waiting for Kubernetes API. This error usually happens when there is a problem on the bootstrap host that prevents creating a temporary control plane + - name: SCACertPullFailed + searchRegexStrings: + - "Failed to pull SCA certs from" + installFailingReason: SCACertPullFailed + installFailingMessage: Failed to pull SCA certs # Keep these at the bottom so that they're only hit if nothing above matches. # We don't want to show these to users unless it's a last resort. It's barely better than "unknown error".