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

CLI fails if a cluster is still creating in AWS #858

Open
mateimicu opened this issue Sep 24, 2023 · 1 comment
Open

CLI fails if a cluster is still creating in AWS #858

mateimicu opened this issue Sep 24, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mateimicu
Copy link
Owner

Describe the bug
When a cluster is still creating in AWS, there is a panic if you run the CLI.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102bbc4dc]

goroutine 60 [running]:
github.com/mateimicu/kdiscover/internal/aws.(*EKSClient).detailCluster(0x14000122ac0, {0x1400016c030, 0x12})
        /.../kdiscover/internal/aws/eks.go:95 +0x38c
github.com/mateimicu/kdiscover/internal/aws.(*EKSClient).GetClusters.func1(0x14000702180, 0x1)
        /.../kdiscover/internal/aws/eks.go:44 +0x3b0
github.com/aws/aws-sdk-go/service/eks.(*EKS).ListClustersPagesWithContext(0x1400011e238, {0x1031a80a8?, 0x1400003c0f8}, 0x140003d3b00, 0x140003a03a8, {0x0, 0x0, 0x0})
        /Users/matei/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.224/service/eks/api.go:2430 +0x178
github.com/aws/aws-sdk-go/service/eks.(*EKS).ListClustersPages(0x0?, 0x0?, 0x0?)
        /Users/matei/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.224/service/eks/api.go:2404 +0x48
github.com/mateimicu/kdiscover/internal/aws.(*EKSClient).GetClusters(0x14000122ac0, 0x1400008c6c0)
        /.../kdiscover/internal/aws/eks.go:33 +0xac
created by github.com/mateimicu/kdiscover/internal/aws.getEKSClusters
        /.../kdiscover/internal/aws/eks_cluster.go:73 +0x128

I think this is because some Cluster information is not present but we assume it is.

Environment:

  • OS: macOS
  • Shell zsh
    Output of kdiscover version
    {"Version":"0.1.5","Commit":"933c61215acc55d4b90535541541a960f2943408","Date":"2022-07-18T23:32:14Z"}

To Reproduce
Steps to reproduce the behavior:

  1. Go to run kdiscover aws list

Expected behavior
The list found clusters.

@mateimicu mateimicu added the bug Something isn't working label Sep 24, 2023
@mateimicu mateimicu self-assigned this Sep 24, 2023
@github-project-automation github-project-automation bot moved this to To do in kdiscover Sep 24, 2023
@mateimicu
Copy link
Owner Author

Extra loggs

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x104671f3c]

goroutine 60 [running]:
github.com/mateimicu/kdiscover/internal/aws.(*EKSClient).detailCluster(0x140004baae0, {0x140007b2318, 0x12})
        /.../kdiscover/kdiscover/internal/aws/eks.go:95 +0x4dc
github.com/mateimicu/kdiscover/internal/aws.(*EKSClient).GetClusters.func1(0x14000160180, 0x1)
        /.../kdiscover/kdiscover/internal/aws/eks.go:44 +0x4e0
github.com/aws/aws-sdk-go/service/eks.(*EKS).ListClustersPagesWithContext(0x1400000e280, {0x104be9d70, 0x140001ac008}, 0x1400061e6f0, 0x1400019c450, {0x0, 0x0, 0x0})
        /home/runner/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.57/service/eks/api.go:2344 +0x14c
github.com/aws/aws-sdk-go/service/eks.(*EKS).ListClustersPages(0x1400000e280, 0x1400061e6f0, 0x1400019c450)
        /home/runner/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.57/service/eks/api.go:2318 +0x60
github.com/mateimicu/kdiscover/internal/aws.(*EKSClient).GetClusters(0x140004baae0, 0x140001827e0)
        /.../kdiscover/kdiscover/internal/aws/eks.go:33 +0xc0
created by github.com/mateimicu/kdiscover/internal/aws.getEKSClusters
        /.../kdiscover/kdiscover/internal/aws/eks_cluster.go:73 +0x2ac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

1 participant