open-cluster-management-io / registration

hub / spoke registration controllers
Apache License 2.0
42 stars 58 forks source link

check e2e mutatingWebhookDeployment replicas #267

Closed haoqing0110 closed 2 years ago

haoqing0110 commented 2 years ago

Fix the below error when running e2e cases before mutatingWebhook Deployment is ready

Taints update check Check the taint to update according to the condition status 
  Should update taints automatically
  /root/go/src/open-cluster-management.io/registration/test/e2e/taint_update_test.go:43

• Failure in Spec Setup (BeforeEach) [0.007 seconds]
Taints update check
/root/go/src/open-cluster-management.io/registration/test/e2e/taint_update_test.go:16
  Check the taint to update according to the condition status
  /root/go/src/open-cluster-management.io/registration/test/e2e/taint_update_test.go:17
    Should update taints automatically [BeforeEach]
    /root/go/src/open-cluster-management.io/registration/test/e2e/taint_update_test.go:43

    Unexpected error:
        <*errors.StatusError | 0xc0003941e0>: {
            ErrStatus: {
                TypeMeta: {Kind: "", APIVersion: ""},
                ListMeta: {
                    SelfLink: "",
                    ResourceVersion: "",
                    Continue: "",
                    RemainingItemCount: nil,
                },
                Status: "Failure",
                Message: "Internal error occurred: failed calling webhook \"managedclustermutators.admission.cluster.open-cluster-management.io\": failed to call webhook: the server is currently unable to handle the request",
                Reason: "InternalError",
                Details: {
                    Name: "",
                    Group: "",
                    Kind: "",
                    UID: "",
                    Causes: [
                        {
                            Type: "",
                            Message: "failed calling webhook \"managedclustermutators.admission.cluster.open-cluster-management.io\": failed to call webhook: the server is currently unable to handle the request",
                            Field: "",
                        },
                    ],
                    RetryAfterSeconds: 0,
                },
                Code: 500,
            },
        }
        Internal error occurred: failed calling webhook "managedclustermutators.admission.cluster.open-cluster-management.io": failed to call webhook: the server is currently unable to handle the request
    occurred

    /root/go/src/open-cluster-management.io/registration/test/e2e/taint_update_test.go:35

Signed-off-by: haoqing0110 qhao@redhat.com

haoqing0110 commented 2 years ago

/assign @skeeey /cc @ldpliu

haoqing0110 commented 2 years ago

/assign @elgnay @zhiweiyin318

elgnay commented 2 years ago

/lgtm

qiujian16 commented 2 years ago

I think we have checked the status of apiservices? is it not enough?

haoqing0110 commented 2 years ago

@qiujian16 The error failed to call webhook: the server is currently unable to handle the request occurs when the mutatingWebhookDeployment updated in
https://github.com/open-cluster-management-io/registration/blob/main/test/e2e/e2e_suite_test.go#L116, backend old pod is terminating and the new pod is not getting ready, and e2e taint testing case get started at the same time.

skeeey commented 2 years ago

/approve /lgtm

openshift-ci[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haoqing0110, skeeey

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/open-cluster-management-io/registration/blob/main/OWNERS)~~ [skeeey] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment