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

command panic when use kubectl to get the pods list #66597

Closed
hchenxa opened this issue Jul 25, 2018 · 2 comments
Closed

command panic when use kubectl to get the pods list #66597

hchenxa opened this issue Jul 25, 2018 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one.

Comments

@hchenxa
Copy link
Contributor

hchenxa commented Jul 25, 2018

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

What happened:
I was using kubectl v1.11.1, and command panic when try to get pods list by command kubectl get pods -n kube-system like below:

root@hchenxa-2:~# kubectl  get pods -n kube-system
panic: runtime error: index out of range

goroutine 1 [running]:
k8s.io/kubernetes/pkg/printers.PrintTable(0xc421488c80, 0x60d3720, 0xc421265d00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/printers/humanreadable.go:366 +0x5d6
k8s.io/kubernetes/pkg/printers.(*HumanReadablePrinter).PrintObj(0xc42019fe00, 0x60ea9a0, 0xc421488c80, 0x60d3720, 0xc421265d00, 0x0, 0x0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/printers/humanreadable.go:286 +0x7ca
k8s.io/kubernetes/pkg/printers.(ResourcePrinter).PrintObj-fm(0x60ea9a0, 0xc421488c80, 0x60d3720, 0xc421265d00, 0x60d1980, 0xc4210f74a0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/get/get.go:252 +0x57
k8s.io/kubernetes/pkg/printers.ResourcePrinterFunc.PrintObj(0xc421599560, 0x60ea9a0, 0xc421488c80, 0x60d3720, 0xc421265d00, 0x0, 0x0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/printers/interface.go:38 +0x4e
k8s.io/kubernetes/pkg/kubectl/cmd/get.(*GetOptions).Run(0xc4202649a0, 0x6159420, 0xc421259350, 0xc4213bf900, 0xc421409d70, 0x1, 0x3, 0x0, 0x0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/get/get.go:444 +0xae9
k8s.io/kubernetes/pkg/kubectl/cmd/get.NewCmdGet.func1(0xc4213bf900, 0xc421409d70, 0x1, 0x3)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/get/get.go:159 +0x115
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).execute(0xc4213bf900, 0xc421409ce0, 0x3, 0x3, 0xc4213bf900, 0xc421409ce0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:760 +0x2c1
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc421253b80, 0x4, 0xc421253b80, 0xc420effed0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:846 +0x30a
k8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).Execute(0xc421253b80, 0x7, 0xc420304500)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:794 +0x2b
main.main()
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/hyperkube/main.go:64 +0x244

What you expected to happen:
The command should work fine.
How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): v1.11.1
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release): Ubuntu 16.04.4 LTS
  • Kernel (e.g. uname -a): 4.4.0-122
  • Install tools:
  • Others:
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jul 25, 2018
@k8s-ci-robot
Copy link
Contributor

@hchenxa: There are no sig labels on this issue. Please add a sig label.

A sig label can be added by either:

  1. mentioning a sig: @kubernetes/sig-<group-name>-<group-suffix>
    e.g., @kubernetes/sig-contributor-experience-<group-suffix> to notify the contributor experience sig, OR

  2. specifying the label manually: /sig <group-name>
    e.g., /sig scalability to apply the sig/scalability label

Note: Method 1 will trigger an email to the group. See the group list.
The <group-suffix> in method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals

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.

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 25, 2018
@hchenxa
Copy link
Contributor Author

hchenxa commented Jul 25, 2018

seems same with #66379, close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

2 participants