skupperproject / skupper

Skupper is an implementation of a Virtual Application Network, enabling rich hybrid cloud communication.
http://skupper.io
Apache License 2.0
579 stars 70 forks source link

Skupper panic on skupper status #1000

Open lordgordon opened 1 year ago

lordgordon commented 1 year ago

I upgraded my local skupper to 1.2.2, and now skupper status fails with the following error when checking a remote cluster still on 0.8.7:

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

goroutine 1 [running]:
github.com/skupperproject/skupper/client.(*VanClient).RouterInspectNamespace(0x140004333b0, {0x102020b08, 0x14000122000}, {0x140003b8a00, 0x7})
    /home/circleci/project/client/router_inspect.go:106 +0x264
github.com/skupperproject/skupper/client.(*VanClient).RouterInspect(0x140004333b0, {0x102020b08, 0x14000122000})
    /home/circleci/project/client/router_inspect.go:76 +0x48
main.(*SkupperKubeSite).Status(0x1400046ecb0, 0x140003b5b80, {0x102a08720, 0x0, 0x0})
    /home/circleci/project/cmd/skupper/skupper_kube_site.go:203 +0x70
github.com/spf13/cobra.(*Command).execute(0x140003b5b80, {0x102a08720, 0x0, 0x0})
    /home/circleci/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:840 +0x668
github.com/spf13/cobra.(*Command).ExecuteC(0x140003b5080)
    /home/circleci/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:945 +0x3d4
github.com/spf13/cobra.(*Command).Execute(...)
    /home/circleci/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:885
main.main()
    /home/circleci/project/cmd/skupper/skupper.go:991 +0x30

My local machine is an Apple Silicon.

I would be able to upgrade the remote skipper to 1.2.2.

grs commented 1 year ago

1.2.2 and 0.8.7 are not compatible (there were some significant renaming changes among others). We do in general aim to ensure compatability between versions, but on occassion have had to make breaking changes.

If desired you can update a site using skupper update. If not then you would probably need to install the older client to manage pre 1.0.0 sites.

grs commented 1 year ago

The panic is certainly ugly and easy to fix, but making the newer cli usable against the 0.8.x versions is a bugger issue and not one I think that justifies the effort.

lordgordon commented 1 year ago

@grs, thanks for this clarification.