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

v1.4 dies with "runtime error: integer divide by zero" on linux #18

Closed
leberknecht opened this issue Apr 10, 2019 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@leberknecht
Copy link




Describe the bug
When running popeye, the "Connectivity" and "Metrics" steps seem to be ok (have a checkmark), but then i get (removed some newlines)

SUMMARY
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
SERVICEACCOUNTS
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
💥 Scan failed!: the server could not find the requested resource (get clusterro
lebindings.rbac.authorization.k8s.io)
SERVICES
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
💥 Scan failed!: the server could not find the requested resource (get services)
PODS
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
💥 Scan failed!: the server could not find the requested resource (get pods)
NAMESPACES
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
💥 Scan failed!: the server could not find the requested resource (get namespace
s)
NODES
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
💥 Scan failed!: the server could not find the requested resource (get nodes)

panic: runtime error: integer divide by zero

goroutine 1 [running]:
github.com/derailed/popeye/pkg.(*Popeye).printSummary(0xc00054bd40)
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/pkg/popeye.go:95 +0x4e8
github.com/derailed/popeye/pkg.(*Popeye).Sanitize(0xc00054bd40)
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/pkg/popeye.go:76 +0x4fa
github.com/derailed/popeye/cmd.doIt(0x21b02e0, 0x21dbac8, 0x0, 0x0)
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/cmd/root.go:56 +0xdf
github.com/spf13/cobra.(*Command).execute(0x21b02e0, 0xc0000ae170, 0x0, 0x0, 0x21b02e0, 0xc0000ae170)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0x21b02e0, 0x0, 0x0, 0xc0003b7f88)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2ec
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
github.com/derailed/popeye/cmd.Execute()
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/cmd/root.go:43 +0x32
main.main()
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/main.go:19 +0x20

To Reproduce
Steps to reproduce the behavior:

  1. install popeye using snap on a linux machine (im using ubuntu 18.04)
  2. fire popeye
  3. See error

Expected behavior
Should run through :) Im also surprised about the

Scan failed!: the server could not find the requested resource (get clusterro
lebindings.rbac.authorization.k8s.io)

with 0.1.3 everything works fine, so i doubt that it is a permissions issue.

Screenshots

Versions (please complete the following information):

  • OS: Linux, Unbuntu 18.04, 4.15.0-46-generic
  • Popeye 0.1.4
  • K8s:
kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:53:57Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.5-gke.5", GitCommit:"2c44750044d8aeeb6b51386ddb9c274ff0beb50b", GitTreeState:"clean", BuildDate:"2019-02-01T23:53:25Z", GoVersion:"go1.10.8b4", Compiler:"gc", Platform:"linux/amd64"}

Additional context
Also wondering (not that familiar with golang): is it normal to have the path /Users/fernand in the exception message? User doesnt exist here, but i guess this is some kind of go-package-effect?

@derailed derailed added the bug Something isn't working label Apr 10, 2019
@derailed
Copy link
Owner

@leberknecht Thank you for the report!

Curious, within the same session in which you've launched Popeye, can you double check using

kubectl get svc
popeye

and report what this yields? I am thinking something isn't quiet right with your kubeconfig context and hence causing Popeye to fail??

@leberknecht
Copy link
Author

Sure :)

delf % popeye version  
 ___     ___ _____   _____   K          .-'-.     
| _ \___| _ \ __\ \ / / __|   8     __|      `\  
|  _/ _ \  _/ _| \ V /| _|     s   `-,-`--._   `\
|_| \___/_| |___| |_| |___|   []  .->'  a     `|-'
  Biffs`em and Buffs`em!        `=/ (__/_       /  
                                  \_,    `    _)  
                                     `----;  |     
Version:   0.1.4
Commit:    45a8026e5bf1d82d896f4ed9c4fa58ba15a63cf0
Date:      2019-04-06T19:22:31Z
delf % kubectl get svc
NAME         TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.15.240.1   <none>        443/TCP   134d
delf % popeye

 ___     ___ _____   _____                                    K          .-'-.     
| _ \___| _ \ __\ \ / / __|                                    8     __|      `\  
|  _/ _ \  _/ _| \ V /| _|                                      s   `-,-`--._   `\
|_| \___/_| |___| |_| |___|                                    []  .->'  a     `|-'
  Biffs`em and Buffs`em!                                        `=/ (__/_       /  
                                                                  \_,    `    _)  
                                                                     `----;  |     


CLUSTER [N/A]
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
  · Connectivity...............................................................✅
  · Metrics....................................................................✅


SUMMARY
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

SERVICEACCOUNTS
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

💥 Scan failed!: the server could not find the requested resource (get clusterro
lebindings.rbac.authorization.k8s.io)


SERVICES
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

💥 Scan failed!: the server could not find the requested resource (get services)


PODS
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

💥 Scan failed!: the server could not find the requested resource (get pods)


NAMESPACES
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

💥 Scan failed!: the server could not find the requested resource (get namespace
s)


NODES
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

💥 Scan failed!: the server could not find the requested resource (get nodes)

panic: runtime error: integer divide by zero

goroutine 1 [running]:
github.com/derailed/popeye/pkg.(*Popeye).printSummary(0xc00002fd40)
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/pkg/popeye.go:95 +0x4e8
github.com/derailed/popeye/pkg.(*Popeye).Sanitize(0xc00002fd40)
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/pkg/popeye.go:76 +0x4fa
github.com/derailed/popeye/cmd.doIt(0x21b02e0, 0x21dbac8, 0x0, 0x0)
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/cmd/root.go:56 +0xdf
github.com/spf13/cobra.(*Command).execute(0x21b02e0, 0xc00003a190, 0x0, 0x0, 0x21b02e0, 0xc00003a190)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0x21b02e0, 0x0, 0x0, 0xc000373f88)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2ec
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
github.com/derailed/popeye/cmd.Execute()
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/cmd/root.go:43 +0x32
main.main()
	/Users/fernand/go_wk/derailed/src/github.com/derailed/popeye/main.go:19 +0x20

as said, works fine with v.0.1.3

@derailed
Copy link
Owner

@leberknecht Thank you for reporting back! This is strange. I noticed your cluster does not have a name so I think there is problem with popeye connecting to the api server. I think my connectivity check is a dud so I'll fix that. In the mean time, to make sure this is not a release issue. Would you mind trying the tarball directly from the release1.4 page and see if it goes any further? Thank you!!

@leberknecht
Copy link
Author

Hm! The version from the release page does indeed work!

delf % md5sum /snap/bin/popeye #broken
84aa51611afbf02bba0516d9f1e9fd8d  /snap/bin/popeye
delf  % md5sum Downloads/popeye #works                      
b3e0dc5390c14953d49a2bcbd1503292  Downloads/popeye

Solves my problem :) Thank you!

@derailed
Copy link
Owner

@leberknecht Thank you so much for looking into it and for your help on this!!

Looks like something went south with that particular release on snap. Back to the drawing board ;(

@derailed
Copy link
Owner

@leberknecht Can you given 0.2.0 a "snap" and see if we're happier in snap land? Thank you!
Closing for now...

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
None yet
Development

No branches or pull requests

2 participants