Thanks to visit codestin.com
Credit goes to github.com

Skip to content

randoms deployment/ds not found or nil pointer dereference #726

@pierredavidbelanger

Description

@pierredavidbelanger




Describe the bug

while in :ds listing I get a lot of

  • daemonsets.apps "svclb-traefik" not found if I press l to get logs
  • or Boom!! runtime error: invalid memory address or nil pointer dereference. if I press enter to list pods

To Reproduce

Steps to reproduce the behavior:

Since 0.19.6 It seem I can reproduce consistently if k9s just started and I am already in the :ds list

  1. open k9s, go to :ds then 0, then :q
  2. re-open k9s, you should be on the :ds list
  3. don't move the selection, just hit l or enter

Versions (please complete the following information):

  • OS: Linux 5.6.7-050607-generic x86_64 GNU/Linux
  • K9s 0.19.6 [7969]
  • K8s v1.18.2+k3s1

Additional context

I found this in the log file:

9:16AM ERR daemonsets.apps "fluentd" not found
9:16AM ERR Boom! runtime error: invalid memory address or nil pointer dereference
9:16AM ERR goroutine 1 [running]:
runtime/debug.Stack(0x358f600, 0x201b603, 0x0)
	runtime/debug/stack.go:24 +0x9d
github.com/derailed/k9s/cmd.run.func1()
	github.com/derailed/k9s/cmd/root.go:73 +0x11d
panic(0x1d72ba0, 0x355a5b0)
	runtime/panic.go:969 +0x166
github.com/derailed/tview.(*Application).Run.func1(0xc000782200)
	github.com/derailed/[email protected]/application.go:149 +0x82
panic(0x1d72ba0, 0x355a5b0)
	runtime/panic.go:969 +0x166
github.com/derailed/k9s/internal/view.(*DaemonSet).showPods(0xc0008acc70, 0xc0007b4420, 0x24adf40, 0xc000d24780, 0xc0009deae0, 0x12, 0xc001535de0, 0xb)
	github.com/derailed/k9s/internal/view/ds.go:50 +0x10c
github.com/derailed/k9s/internal/view.(*Browser).enterCmd(0xc000d4e1c0, 0xc000a0c420, 0xc0008acc70)
	github.com/derailed/k9s/internal/view/browser.go:277 +0x176
github.com/derailed/k9s/internal/view.(*Table).keyboard(0xc000679380, 0xc000a0c420, 0xc00161da38)
	github.com/derailed/k9s/internal/view/table.go:67 +0xa9
github.com/derailed/tview.(*Box).WrapInputHandler.func1(0xc000a0c420, 0xc0005067f0)
	github.com/derailed/[email protected]/box.go:161 +0x75
github.com/derailed/tview.(*Application).Run(0xc000782200, 0x0, 0x0)
	github.com/derailed/[email protected]/application.go:234 +0x3e2
github.com/derailed/k9s/internal/view.(*App).Run(0xc0007b4420, 0x2400170, 0x6)
	github.com/derailed/k9s/internal/view/app.go:409 +0x87
github.com/derailed/k9s/cmd.run(0x356f4e0, 0x35c5c30, 0x0, 0x0)
	github.com/derailed/k9s/cmd/root.go:88 +0x10b
github.com/spf13/cobra.(*Command).execute(0x356f4e0, 0xc00004c1b0, 0x0, 0x0, 0x356f4e0, 0xc00004c1b0)
	github.com/spf13/[email protected]/command.go:846 +0x29d
github.com/spf13/cobra.(*Command).ExecuteC(0x356f4e0, 0x0, 0x0, 0x0)
	github.com/spf13/[email protected]/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:887
github.com/derailed/k9s/cmd.Execute()
	github.com/derailed/k9s/cmd/root.go:64 +0x2d
main.main()
	github.com/derailed/k9s/main.go:27 +0x1a6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions