-
Notifications
You must be signed in to change notification settings - Fork 337
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
feat(kumactl) return Kuma DP and Envoy version in the output of inspect dataplanes
#1298
feat(kumactl) return Kuma DP and Envoy version in the output of inspect dataplanes
#1298
Conversation
…lanes Signed-off-by: Jacek Ewertowski <[email protected]>
Signed-off-by: Jacek Ewertowski <[email protected]>
Signed-off-by: Jacek Ewertowski <[email protected]>
Signed-off-by: Jacek Ewertowski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small thing, otherwise 🆗
@@ -102,6 +102,17 @@ func printDataplaneOverviews(now time.Time, dataplaneInsights *mesh_core.Datapla | |||
dataplaneInsight.GetMTLS().GetCertificateExpirationTime() | |||
certRegenerations := strconv.Itoa(int(dataplaneInsight.GetMTLS().GetCertificateRegenerations())) | |||
|
|||
var kumaDpVersion string | |||
var envoyVersion string | |||
if lastSubscription.Version != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lastSubscription.GetVersion()
which is nil safety version of .Version
. Otherwise I saw that
❯❯❯ kumactl inspect dataplanes
MESH NAME TAGS STATUS LAST CONNECTED AGO LAST UPDATED AGO TOTAL UPDATES TOTAL ERRORS CERT REGENERATED AGO CERT EXPIRATION CERT REGENERATIONS KUMA-DP VERSION ENVOY VERSION
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x173aed0]
goroutine 1 [running]:
github.com/kumahq/kuma/app/kumactl/cmd/inspect.printDataplaneOverviews.func1.1(0x0, 0x0, 0x0)
/Users/jakob/kong/kuma/app/kumactl/cmd/inspect/inspect_dataplanes.go:107 +0x2b0
github.com/kumahq/kuma/app/kumactl/pkg/output/table.(*printer).Print(0x3ee5908, 0xc000bce270, 0xd, 0xd, 0xc000bec660, 0x0, 0x0, 0x2db7540, 0xc00000e018, 0x0, ...)
/Users/jakob/kong/kuma/app/kumactl/pkg/output/table/printer.go:37 +0xa8
github.com/kumahq/kuma/app/kumactl/cmd/inspect.printDataplaneOverviews(0xbfede8845b03aa28, 0x3ab6861, 0x3ea9760, 0xc0004a1200, 0x2db7540, 0xc00000e018, 0xc000950000, 0xc0004a1200)
/Users/jakob/kong/kuma/app/kumactl/cmd/inspect/inspect_dataplanes.go:134 +0x22a
github.com/kumahq/kuma/app/kumactl/cmd/inspect.newInspectDataplanesCmd.func1(0xc000b4a2c0, 0x3ee5908, 0x0, 0x0, 0xc000bb7d78, 0xc000bb7d50)
/Users/jakob/kong/kuma/app/kumactl/cmd/inspect/inspect_dataplanes.go:51 +0x2b7
github.com/kumahq/kuma/app/kumactl/pkg/errors.FormatErrorWrapper.func1(0xc000b4a2c0, 0x3ee5908, 0x0, 0x0, 0x0, 0x0)
/Users/jakob/kong/kuma/app/kumactl/pkg/errors/formatter.go:14 +0x51
github.com/spf13/cobra.(*Command).execute(0xc000b4a2c0, 0x3ee5908, 0x0, 0x0, 0xc000b4a2c0, 0x3ee5908)
/Users/jakob/go/pkg/mod/github.com/spf13/[email protected]/command.go:842 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000b80580, 0xc000b80580, 0x0, 0x0)
/Users/jakob/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/Users/jakob/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/kumahq/kuma/app/kumactl/cmd.Execute()
/Users/jakob/kong/kuma/app/kumactl/cmd/root.go:95 +0xa5
main.main()
/Users/jakob/kong/kuma/app/kumactl/main.go:6 +0x25
for a short moment when DP was up.
Dataplane may not have DataplaneInsight yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Signed-off-by: Jacek Ewertowski <[email protected]>
…ect dataplanes` (#1298) Signed-off-by: Jacek Ewertowski <[email protected]> (cherry picked from commit 15f4754)
…ect dataplanes` (#1298) (#1329) Signed-off-by: Jacek Ewertowski <[email protected]> (cherry picked from commit 15f4754) Co-authored-by: Jacek Ewertowski <[email protected]>
Summary
This change allows to inspect version of Kuma DP and Envoy.
It is compatible with older versions of Kuma CP which don't collect these versions.
Issues resolved
Fix #1112 and #1244