Skip to content

[E2E Framework] Improve E2E Framework to Collect Debug Artifacts on clusterctl init Failures #12155

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

Open
zhanggbj opened this issue May 7, 2025 · 2 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@zhanggbj
Copy link
Contributor

zhanggbj commented May 7, 2025

What would you like to be added (User Story)?

As a developer, I would like to access the debug info in artifacts on clusterctl init failures.

Detailed Description

Currently, when running E2E tests, if clusterctl init fails (e.g., due to CAPI components not reaching a Ready status as below), the test artifacts do not contain sufficient information to debug. This lack of context makes it difficult to identify root causes especially when we couldn't access infra.

We need e2eframework to collect the relevant diagnostic data when clusterctl init or early cluster bootstrap steps fail.

INFO: The kubeconfig file for the kind cluster is /tmp/e2e-kind3738542185
  STEP: Initialize bootstrap cluster @ 05/07/25 06:16:33.625
  INFO: clusterctl init --config /tmp/tmp.I8vcxeUaCN/repository/clusterctl-config.yaml --kubeconfig /tmp/e2e-kind3738542185 --wait-providers --core cluster-api --bootstrap kubeadm --control-plane kubeadm --infrastructure vsphere
  [FAILED] in [SynchronizedBeforeSuite] - /home/prow/go/pkg/mod/sigs.k8s.io/cluster-api/test@v1.10.1/framework/clusterctl/client.go:90 @ 05/07/25 06:22:18.911
[SynchronizedBeforeSuite] [FAILED] [396.063 seconds]
[SynchronizedBeforeSuite] 
/home/prow/go/src/k8s.io/cloud-provider-vsphere/test/e2e/e2e_suite_test.go:143
  [FAILED] failed to run clusterctl init
  Unexpected error:
      <*errors.withStack | 0xc0000108e8>: 
      deployment "capi-controller-manager" is not ready after 5m0s: context deadline exceeded
      {
          error: <*errors.withMessage | 0xc0022e6680>{
              cause: <context.deadlineExceededError>{},
              msg: "deployment \"capi-controller-manager\" is not ready after 5m0s",
          },
          stack: [0x24b[807](http://52.34.10.152:30002/view/s3/prow-logs/pr-logs/pull/team-cluster-api_cloud-provider-vsphere/89/pull-cloud-provider-vsphere-e2e-test/1919998318331564032#1:build-log.txt%3A807)0, 0x24b7da7, 0x24b74b4, 0x24fa1ce, 0x259ce8a, 0x259f64b, 0x264e3f3, 0x19aa3a2, 0x19bae16, 0x264d479, 0x5029c6, 0x501ad9, 0x199eede, 0x19af1ce, 0x19b29fb, 0x4841a1],
      }
  occurred
  In [SynchronizedBeforeSuite] at: /home/prow/go/pkg/mod/sigs.k8s.io/cluster-api/test@v1.10.1/framework/clusterctl/client.go:90 @ 05/07/25 06:22:18.911

Anything else you would like to add?

No response

Label(s) to be applied

/kind feature
One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 7, 2025
@chrischdi
Copy link
Member

/triage accepted
/priority backlog

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. labels May 14, 2025
@chrischdi chrischdi added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label May 14, 2025
@chrischdi
Copy link
Member

/help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants