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

Check if kubeconfig exists before dumping resources #16205

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

hakman
Copy link
Member

@hakman hakman commented Jan 3, 2024

/cc @rifelpet

I0103 05:06:02.213472   14553 up.go:58] Cleaning up any leaked resources from previous cluster
I0103 05:06:02.424454   14553 dumplogs.go:47] /home/prow/go/src/k8s.io/bin/kops toolbox dump --name e2e-ff02749ef8-a423a.test-cncf-aws.k8s.io --dir /logs/artifacts --private-key /tmp/kops/e2e-ff02749ef8-a423a.test-cncf-aws.k8s.io/id_ed25519 --ssh-user ubuntu
I0103 05:06:02.431913   14592 featureflag.go:168] FeatureFlag "AWSSingleNodesInstanceGroup"=true
W0103 05:06:04.850989   14592 toolbox_dump.go:172] cannot load kubeconfig settings for "e2e-ff02749ef8-a423a.test-cncf-aws.k8s.io": context "e2e-ff02749ef8-a423a.test-cncf-aws.k8s.io" does not exist
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1d0 pc=0x3f0d853]

goroutine 1 [running]:
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End.func1()
	go.opentelemetry.io/otel/sdk@v1.21.0/trace/span.go:388 +0x25
go.opentelemetry.io/otel/sdk/trace.(*recordingSpan).End(0xc000281500, {0x0, 0x0, 0x0?})
	go.opentelemetry.io/otel/sdk@v1.21.0/trace/span.go:426 +0xa3b
panic({0x48dc800?, 0x8945740?})
	runtime/panic.go:914 +0x21f
k8s.io/kops/pkg/dump.NewResourceDumper(0x0, {0x5413e0c, 0x4}, {0x7ffc7debcce8, 0xf})
	k8s.io/kops/pkg/dump/resourcedumper.go:76 +0x33
main.RunToolboxDump({0x60f72f8, 0xc00088de00}, {0x60ce208?, 0xc000281080?}, {0x60bf580, 0xc000126020}, 0xc00078cf00)
	k8s.io/kops/cmd/kops/toolbox_dump.go:231 +0x1838
main.NewCmdToolboxDump.func1(0xc00050c900?, {0xc000063300?, 0x4?, 0x5413e98?})
	k8s.io/kops/cmd/kops/toolbox_dump.go:95 +0x38
github.com/spf13/cobra.(*Command).execute(0xc0008a8300, {0xc000063280, 0x8, 0x8})
	github.com/spf13/cobra@v1.8.0/command.go:983 +0xabc
github.com/spf13/cobra.(*Command).ExecuteC(0x8970660)
	github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	github.com/spf13/cobra@v1.8.0/command.go:1032
main.Execute({0x60f7250, 0x89c6620})
	k8s.io/kops/cmd/kops/root.go:100 +0x331
main.run({0x60f7250, 0x89c6620})
	k8s.io/kops/cmd/kops/main.go:55 +0x165
main.main()
	k8s.io/kops/cmd/kops/main.go:29 +0x25
W0103 05:06:04.864055   14553 dumplogs.go:55] kops toolbox dump failed: exit status 2

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 3, 2024
Copy link
Member

@rifelpet rifelpet left a comment

Choose a reason for hiding this comment

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

I agree we should skip dumping resources in this case, as opposed to regenerating a kubeconfig from the previous job's cluster and dumping its resources.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rifelpet

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 3, 2024
@k8s-ci-robot k8s-ci-robot merged commit bbd6521 into kubernetes:master Jan 3, 2024
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Jan 3, 2024
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants