Closed lynnemorrison closed 2 months ago
Dependency with (on common encode functions): https://github.com/skupperproject/skupper/pull/1510
I have created a listener without creating a site first, and the controller failed.
skupper listener create noe 8080 --host 127.0.0.1 --routing-key example
Waiting for create to complete...
Error: Listener "noe" not ready yet, check the logs for more information
Logs from the controller:
2024/07/03 14:15:32 Waiting for informer caches to sync
2024/07/03 14:15:32 checking listener noe in skupper
2024/07/03 14:15:32 updating listener skupper/noe...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x158 pc=0x1377eba]
goroutine 1 [running]:
github.com/skupperproject/skupper/pkg/kube/site.(*Site).groups(...)
/go/src/app/pkg/kube/site/site.go:164
github.com/skupperproject/skupper/pkg/kube/site.(*Site).updateRouterConfigForGroups(0xc00012c000?, {0x1a26e40?, 0xc0005b2500?})
/go/src/app/pkg/kube/site/site.go:557 +0x3a
github.com/skupperproject/skupper/pkg/kube/site.(*Site).CheckListener(0xc0004aeaa0, {0xc00081636c?, 0xc00077de50?}, 0x7?)
/go/src/app/pkg/kube/site/site.go:642 +0x4d
main.(*Controller).Run(0xc00034e580, 0xc00010e180)
/go/src/app/cmd/controller/controller.go:167 +0xb9a
This failure should be addressed in the controller code (https://github.com/skupperproject/skupper/issues/1525), but in the client we can check first if there is a site already before creating the listener.
added check to make sure site exists before trying to create a listener. Will add same check to connector if you are happy with change.
skupper listener commands