cluster-api-provider-vsphere icon indicating copy to clipboard operation
cluster-api-provider-vsphere copied to clipboard

🌱 test: fix collector for machines not having an IP in status and change ignition ssh user to capv

Open chrischdi opened this issue 1 year ago • 15 comments
trafficstars

What this PR does / why we need it:

In case of test failures where machines do not yet have an IP set in status, we are currently not able to collect information like cloud-init log.

This implements a fallback to get the IP address from vSphere instead to still be able to gather information via ssh.

Example Job: https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/periodic-cluster-api-provider-vsphere-e2e-supervisor-conformance-ci-latest-main/1790940294057824256

Which logs:

Failed to get logs for Machine k8s-conformance-9dmcar-cp-z2zcx-mhzxn, Cluster k8s-conformance-n8g9q1/k8s-conformance-9dmcar: dialing host IP address at : dial tcp :22: connect: connection refused

And the resulting empty files: https://gcsweb.k8s.io/gcs/kubernetes-jenkins/logs/periodic-cluster-api-provider-vsphere-e2e-supervisor-conformance-ci-latest-main/1790940294057824256/artifacts/clusters/k8s-conformance-9dmcar/machines/k8s-conformance-9dmcar-cp-z2zcx-mhzxn/

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #

chrischdi avatar May 16 '24 15:05 chrischdi

/test help

chrischdi avatar May 16 '24 16:05 chrischdi

@chrischdi: The specified target(s) for /test were not found. The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-vsphere-e2e-govmomi-blocking-main
  • /test pull-cluster-api-provider-vsphere-e2e-govmomi-conformance-ci-latest-main
  • /test pull-cluster-api-provider-vsphere-e2e-govmomi-conformance-main
  • /test pull-cluster-api-provider-vsphere-e2e-govmomi-main
  • /test pull-cluster-api-provider-vsphere-e2e-govmomi-upgrade-1-30-1-31-main
  • /test pull-cluster-api-provider-vsphere-e2e-supervisor-blocking-main
  • /test pull-cluster-api-provider-vsphere-e2e-supervisor-conformance-ci-latest-main
  • /test pull-cluster-api-provider-vsphere-e2e-supervisor-conformance-main
  • /test pull-cluster-api-provider-vsphere-e2e-supervisor-main
  • /test pull-cluster-api-provider-vsphere-e2e-supervisor-upgrade-1-30-1-31-main
  • /test pull-cluster-api-provider-vsphere-e2e-vcsim-govmomi-main
  • /test pull-cluster-api-provider-vsphere-e2e-vcsim-supervisor-main
  • /test pull-cluster-api-provider-vsphere-test-main
  • /test pull-cluster-api-provider-vsphere-verify-main

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-vsphere-apidiff-main

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-vsphere-apidiff-main
  • pull-cluster-api-provider-vsphere-e2e-govmomi-blocking-main
  • pull-cluster-api-provider-vsphere-e2e-supervisor-blocking-main
  • pull-cluster-api-provider-vsphere-test-main
  • pull-cluster-api-provider-vsphere-verify-main

In response to this:

/test help

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-sigs/prow repository.

k8s-ci-robot avatar May 16 '24 16:05 k8s-ci-robot

/test pull-cluster-api-provider-vsphere-e2e-govmomi-main /test pull-cluster-api-provider-vsphere-e2e-supervisor-main

chrischdi avatar May 16 '24 16:05 chrischdi

/cherry-pick release-1.10

chrischdi avatar May 17 '24 07:05 chrischdi

@chrischdi: once the present PR merges, I will cherry-pick it on top of release-1.10 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.10

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-sigs/prow repository.

/cherry-pick release-1.9

chrischdi avatar May 17 '24 07:05 chrischdi

@chrischdi: once the present PR merges, I will cherry-pick it on top of release-1.9 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.9

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-sigs/prow repository.

/cherry-pick release-1.8

chrischdi avatar May 17 '24 07:05 chrischdi

@chrischdi: once the present PR merges, I will cherry-pick it on top of release-1.8 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.8

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-sigs/prow repository.

/cherry-pick release-1.7

chrischdi avatar May 17 '24 07:05 chrischdi

@chrischdi: once the present PR merges, I will cherry-pick it on top of release-1.7 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.7

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-sigs/prow repository.

/assign @sbueringer @fabriziopandini

chrischdi avatar May 17 '24 07:05 chrischdi

/lgtm

sbueringer avatar May 17 '24 12:05 sbueringer

LGTM label has been added.

Git tree hash: aa72c221c11c0c44678a604323ebdb3751e0a270

k8s-ci-robot avatar May 17 '24 12:05 k8s-ci-robot

/test pull-cluster-api-provider-vsphere-e2e-govmomi-main /test pull-cluster-api-provider-vsphere-e2e-supervisor-main

chrischdi avatar May 21 '24 09:05 chrischdi

@chrischdi: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-vsphere-e2e-supervisor-main 84beaf1ea2c6b52741ec64df969fba0e39a7082b link true /test pull-cluster-api-provider-vsphere-e2e-supervisor-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

k8s-ci-robot avatar May 21 '24 09:05 k8s-ci-robot

Merging, so we can rebase the bump PR. We can follow-up if necessary

/lgtm /approve

sbueringer avatar May 21 '24 12:05 sbueringer

LGTM label has been added.

Git tree hash: f5b6ed18d888b28a85a12c2c00e7918083e69758

k8s-ci-robot avatar May 21 '24 12:05 k8s-ci-robot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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

k8s-ci-robot avatar May 21 '24 12:05 k8s-ci-robot

@chrischdi: #3010 failed to apply on top of branch "release-1.9":

Applying: test: fix collector for machines not having an IP in status
Using index info to reconstruct a base tree...
A	test/e2e/data/infrastructure-vsphere-govmomi/main/ignition/kustomization.yaml
M	test/e2e/e2e_suite_test.go
A	test/framework/log/collector.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/log_collector.go
CONFLICT (content): Merge conflict in test/e2e/log_collector.go
Auto-merging test/e2e/e2e_suite_test.go
CONFLICT (content): Merge conflict in test/e2e/e2e_suite_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 test: fix collector for machines not having an IP in status
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.9

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-sigs/prow repository.

@chrischdi: #3010 failed to apply on top of branch "release-1.8":

Applying: test: fix collector for machines not having an IP in status
Using index info to reconstruct a base tree...
A	test/e2e/data/infrastructure-vsphere-govmomi/main/ignition/kustomization.yaml
M	test/e2e/e2e_suite_test.go
A	test/framework/log/collector.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/log_collector.go
CONFLICT (content): Merge conflict in test/e2e/log_collector.go
Auto-merging test/e2e/e2e_suite_test.go
CONFLICT (content): Merge conflict in test/e2e/e2e_suite_test.go
Auto-merging test/e2e/data/infrastructure-vsphere/main/base/kustomization.yaml
CONFLICT (content): Merge conflict in test/e2e/data/infrastructure-vsphere/main/base/kustomization.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 test: fix collector for machines not having an IP in status
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.8

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-sigs/prow repository.

@chrischdi: #3010 failed to apply on top of branch "release-1.7":

Applying: test: fix collector for machines not having an IP in status
Using index info to reconstruct a base tree...
A	test/e2e/data/infrastructure-vsphere-govmomi/main/ignition/kustomization.yaml
M	test/e2e/e2e_suite_test.go
A	test/framework/log/collector.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/log_collector.go
CONFLICT (content): Merge conflict in test/e2e/log_collector.go
Auto-merging test/e2e/e2e_suite_test.go
CONFLICT (content): Merge conflict in test/e2e/e2e_suite_test.go
Auto-merging test/e2e/data/infrastructure-vsphere/main/base/kustomization.yaml
CONFLICT (content): Merge conflict in test/e2e/data/infrastructure-vsphere/main/base/kustomization.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 test: fix collector for machines not having an IP in status
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.7

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-sigs/prow repository.

@chrischdi: #3010 failed to apply on top of branch "release-1.10":

Applying: test: fix collector for machines not having an IP in status
Applying: remove direct dependency on kind
Using index info to reconstruct a base tree...
M	Makefile
M	test/go.mod
Falling back to patching base and 3-way merge...
Auto-merging test/go.mod
CONFLICT (content): Merge conflict in test/go.mod
Auto-merging Makefile
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 remove direct dependency on kind
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.10

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-sigs/prow repository.