Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci-operator/step-registry/gather/gcp-console: Gather console logs on GCP #13398

Merged
merged 1 commit into from
Dec 18, 2020

Conversation

wking
Copy link
Member

@wking wking commented Nov 4, 2020

Like the similar aws-console step, but for GCP, following these docs. I'm not sure why they require a --zone argument when instances list seems to be able to figure this out, but whatever. Leaving it off doesn't seem to be an option:

wking@cloudshell:~ (openshift-gce-devel-ci)$ gcloud --format json compute instances get-serial-port-output "${INSTANCE_ID}" </dev/null >logs.json
ERROR: (gcloud.compute.instances.get-serial-port-output) Underspecified resource [ci-ln-2gtd6db-f76d1-fj4cl-master-0]. Specify the [--zone] flag.
wking@cloudshell:~ (openshift-gce-devel-ci)$ gcloud --version | head -n1
Google Cloud SDK 315.0.0

OWNERS are like AWS, from 390d6be (#9743), and also the installer's GCP approvers. CC @cgwalters, @enxebre, @jstuever, @patrickdillon, @vrutkovs.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 4, 2020
wking added a commit to wking/openshift-release that referenced this pull request Dec 16, 2020
Abhinav pointed out that there may be some IDs in the SHARED_DIR file,
and when there are, we can gather those even if we lack a kubeconfig
to extract additional IDs from within the cluster [1].

[1]: openshift#13398 (comment)
@wking wking force-pushed the gcp-console-logs branch 2 times, most recently from baaf890 to d4bb001 Compare December 16, 2020 22:54
Like the similar aws-console step, but for GCP, following [1].  I'm
not sure why they require a --zone argument when 'instances list'
seems to be able to figure this out, but whatever.  Leaving it off
doesn't seem to be an option:

  wking@cloudshell:~ (openshift-gce-devel-ci)$ gcloud --format json compute instances get-serial-port-output "${INSTANCE_ID}" </dev/null >logs.json
  ERROR: (gcloud.compute.instances.get-serial-port-output) Underspecified resource [ci-ln-2gtd6db-f76d1-fj4cl-master-0]. Specify the [--zone] flag.
  wking@cloudshell:~ (openshift-gce-devel-ci)$ gcloud --version | head -n1
  Google Cloud SDK 315.0.0

OWNERS are like AWS, from 390d6be (gather/aws/console: Add a step
to gather console logs on AWS, 2020-06-17, openshift#9743), and also the
installer's GCP approvers [2].

[1]: https://cloud.google.com/compute/docs/reference/rest/v1/instances/getSerialPortOutput
[2]: https://github.com/openshift/installer/blob/e17697302ff991ae80d6e9c0c10426db510881e2/OWNERS_ALIASES#L60-L62
@openshift-merge-robot
Copy link
Contributor

@wking: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/rehearse/openshift/cluster-etcd-operator/master/e2e-agnostic 64c641c88e0a505f57343a1fd9a92e1a14c9a9be link /test pj-rehearse
ci/rehearse/openshift/cloud-credential-operator/master/e2e-gcp 64c641c88e0a505f57343a1fd9a92e1a14c9a9be link /test pj-rehearse
ci/rehearse/kubevirt/common-templates/master/e2e-azure-nested-common-templates-unit-tests 5d9d973 link /test pj-rehearse
ci/rehearse/openshift-kni/performance-addon-operators/master/e2e-gcp 5d9d973 link /test pj-rehearse
ci/rehearse/openshift/cincinnati-operator/master/operator-e2e 5d9d973 link /test pj-rehearse
ci/rehearse/kubevirt/hyperconverged-cluster-operator/master/hco-e2e-image-index-gcp 5d9d973 link /test pj-rehearse
ci/rehearse/openshift/cincinnati-operator/release-4.5/operator-e2e 5d9d973 link /test pj-rehearse
ci/rehearse/kubevirt/hyperconverged-cluster-operator/release-1.2/hco-e2e-image-index-gcp 5d9d973 link /test pj-rehearse
ci/rehearse/kubevirt/kubevirt-ssp-operator/master/e2e-functests 5d9d973 link /test pj-rehearse
ci/rehearse/openshift/installer/master/e2e-gcp-shared-vpc 5d9d973 link /test pj-rehearse
ci/rehearse/openshift/cluster-etcd-operator/release-4.6/e2e-agnostic 5d9d973 link /test pj-rehearse
ci/prow/pj-rehearse 5d9d973 link /test pj-rehearse

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks plausible to me.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 18, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, wking

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 0c14cc8 into openshift:master Dec 18, 2020
@openshift-ci-robot
Copy link
Contributor

@wking: Updated the following 2 configmaps:

  • step-registry configmap in namespace ci at cluster api.ci using the following files:
    • key OWNERS using file ci-operator/step-registry/gather/gcp-console/OWNERS
    • key gather-gcp-console-commands.sh using file ci-operator/step-registry/gather/gcp-console/gather-gcp-console-commands.sh
    • key gather-gcp-console-ref.metadata.json using file ci-operator/step-registry/gather/gcp-console/gather-gcp-console-ref.metadata.json
    • key gather-gcp-console-ref.yaml using file ci-operator/step-registry/gather/gcp-console/gather-gcp-console-ref.yaml
    • key ipi-gcp-post-chain.yaml using file ci-operator/step-registry/ipi/gcp/post/ipi-gcp-post-chain.yaml
  • step-registry configmap in namespace ci at cluster app.ci using the following files:
    • key OWNERS using file ci-operator/step-registry/gather/gcp-console/OWNERS
    • key gather-gcp-console-commands.sh using file ci-operator/step-registry/gather/gcp-console/gather-gcp-console-commands.sh
    • key gather-gcp-console-ref.metadata.json using file ci-operator/step-registry/gather/gcp-console/gather-gcp-console-ref.metadata.json
    • key gather-gcp-console-ref.yaml using file ci-operator/step-registry/gather/gcp-console/gather-gcp-console-ref.yaml
    • key ipi-gcp-post-chain.yaml using file ci-operator/step-registry/ipi/gcp/post/ipi-gcp-post-chain.yaml

In response to this:

Like the similar aws-console step, but for GCP, following these docs. I'm not sure why they require a --zone argument when instances list seems to be able to figure this out, but whatever. Leaving it off doesn't seem to be an option:

wking@cloudshell:~ (openshift-gce-devel-ci)$ gcloud --format json compute instances get-serial-port-output "${INSTANCE_ID}" </dev/null >logs.json
ERROR: (gcloud.compute.instances.get-serial-port-output) Underspecified resource [ci-ln-2gtd6db-f76d1-fj4cl-master-0]. Specify the [--zone] flag.
wking@cloudshell:~ (openshift-gce-devel-ci)$ gcloud --version | head -n1
Google Cloud SDK 315.0.0

OWNERS are like AWS, from 390d6be (#9743), and also the installer's GCP approvers. CC @cgwalters, @enxebre, @jstuever, @patrickdillon, @vrutkovs.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@cgwalters
Copy link
Member

I don't think this worked, see errors in this job https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/release-openshift-ocp-installer-e2e-gcp-rt-4.7/1339905732908158976

 Dec 18 12:56:53.204: INFO: lookupDiskImageSources: gcloud error with [[]string{"instance-groups", "list-instances", "", "--format=get(instance)"}]; err:exit status 1
Dec 18 12:56:53.204: INFO:  > ERROR: (gcloud.compute.instance-groups.list-instances) could not parse resource []
Dec 18 12:56:53.204: INFO:  > 

@wking wking deleted the gcp-console-logs branch December 19, 2020 21:50
@wking
Copy link
Member Author

wking commented Dec 19, 2020

...see errors in this job https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/release-openshift-ocp-installer-e2e-gcp-rt-4.7/1339905732908158976 ...

That's an old-style release-template job (no per-step directories here), so this step wasn't involved at all there. But yeah, seems to be having some trouble. See this untrusted API-server after a failed install:

2020/12/19 21:41:53 Container test in pod e2e-gcp-console-ipi-install-install failed, exit code 1, reason Error
2020/12/19 21:41:54 Executing pod "e2e-gcp-console-gather-gcp-console"
2020/12/19 21:41:59 Container cp-secret-wrapper in pod e2e-gcp-console-gather-gcp-console completed successfully
Activated service account credentials for: [do-not-delete-ci-provisioner@openshift-gce-devel-ci.iam.gserviceaccount.com]
Updated property [core/project].
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kube-apiserver-lb-signer")
error: failed to execute wrapped command: exit status 1
2020/12/19 21:42:04 Container test in pod e2e-gcp-console-gather-gcp-console failed, exit code 1, reason Error

And this failure to find a zone after a failed bootstrap:

2020/12/19 12:29:58 Executing pod "e2e-gcp-upgrade-gather-gcp-console"
2020/12/19 12:30:03 Container cp-secret-wrapper in pod e2e-gcp-upgrade-gather-gcp-console completed successfully
Activated service account credentials for: [do-not-delete-ci-provisioner@openshift-gce-devel-ci.iam.gserviceaccount.com]
Updated property [core/project].
Finding the zone for 
No zone found for , so not attempting to gather console logs
Gathering console logs for  from 
ERROR: (gcloud.compute.instances.get-serial-port-output) could not parse resource []
error: failed to execute wrapped command: exit status 1

I'll get a fixup up for these cases where the cluster-install had trouble...

@wking
Copy link
Member Author

wking commented Dec 19, 2020

On the other hand here is a job where the current step worked.

wking added a commit to wking/openshift-release that referenced this pull request Dec 19, 2020
I'm not quite sure where the empty line came from, but [1] had:

  2020/12/19 12:29:58 Executing pod "e2e-gcp-upgrade-gather-gcp-console"
  2020/12/19 12:30:03 Container cp-secret-wrapper in pod e2e-gcp-upgrade-gather-gcp-console completed successfully
  Activated service account credentials for: [do-not-delete-ci-provisioner@openshift-gce-devel-ci.iam.gserviceaccount.com]
  Updated property [core/project].
  Finding the zone for
  No zone found for , so not attempting to gather console logs
  Gathering console logs for  from
  ERROR: (gcloud.compute.instances.get-serial-port-output) could not parse resource []
  error: failed to execute wrapped command: exit status 1
  2020/12/19 12:30:13 Container test in pod e2e-gcp-upgrade-gather-gcp-console failed, exit code 1, reason Error

The 'grep .' will only match non-empty lines.

Also add a 'continue' to the empty-zone branch, which I'd missed in
5d9d973 (ci-operator/step-registry/gather/gcp-console: Gather
console logs on GCP, 2020-11-04, openshift#13398).

[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/release-openshift-origin-installer-e2e-gcp-upgrade-4.7/1340262366092201984#1:build-log.txt%3A171
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants