Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

crd conversion failed: cannot convert int64 to float64 #143

Closed
lvnilesh opened this issue Aug 9, 2019 · 2 comments
Closed

crd conversion failed: cannot convert int64 to float64 #143

lvnilesh opened this issue Aug 9, 2019 · 2 comments
Assignees
Labels
api bug Something isn't working

Comments

@lvnilesh
Copy link

lvnilesh commented Aug 9, 2019

Thanks for octant. It was running nice :) but then I did this.

jx install

now octant crashes like this.

2019-08-08T23:36:00.023-0700	INFO	module/manager.go:75	registering action	{"component": "module-manager", "actionPath": "deployment/configuration", "module-name": "overview"}
2019-08-08T23:36:00.024-0700	INFO	api/content.go:52	Registering routes for overview
2019-08-08T23:36:00.024-0700	INFO	api/content.go:52	Registering routes for cluster-overview
2019-08-08T23:36:00.024-0700	INFO	api/content.go:52	Registering routes for configuration
2019-08-08T23:36:00.024-0700	INFO	dash/dash.go:335	Dashboard is available at http://127.0.0.1:51724

2019-08-08T23:36:01.083-0700	ERROR	navigation/navigation.go:125	prowjobs.prow.k8s.io: crd conversion failed: cannot convert int64 to float64
github.com/vmware/octant/pkg/navigation.CustomResourceDefinitions
	/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:125
github.com/vmware/octant/pkg/navigation.CRDEntries
	/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:74
github.com/vmware/octant/internal/octant.(*NavigationFactory).genNode
	/go/src/github.com/vmware/octant/internal/octant/factory.go:115
github.com/vmware/octant/internal/octant.(*NavigationFactory).Generate.func1
	/go/src/github.com/vmware/octant/internal/octant/factory.go:83
github.com/vmware/octant/vendor/golang.org/x/sync/errgroup.(*Group).Go.func1
	/go/src/github.com/vmware/octant/vendor/golang.org/x/sync/errgroup/errgroup.go:57
2019-08-08T23:36:01.087-0700	ERROR	navigation/navigation.go:125	prowjobs.prow.k8s.io: crd conversion failed: cannot convert int64 to float64
github.com/vmware/octant/pkg/navigation.CustomResourceDefinitions
	/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:125
github.com/vmware/octant/pkg/navigation.CRDEntries
	/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:74
github.com/vmware/octant/internal/octant.(*NavigationFactory).genNode
	/go/src/github.com/vmware/octant/internal/octant/factory.go:115
github.com/vmware/octant/internal/octant.(*NavigationFactory).Generate.func1
	/go/src/github.com/vmware/octant/internal/octant/factory.go:83
github.com/vmware/octant/vendor/golang.org/x/sync/errgroup.(*Group).Go.func1
	/go/src/github.com/vmware/octant/vendor/golang.org/x/sync/errgroup/errgroup.go:57
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1e16d69]

goroutine 188 [running]:
github.com/vmware/octant/pkg/navigation.CRDEntries.func1(0x0, 0xe, 0x0)
	/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:80 +0x49
sort.doPivot_func(0xc0005ebd38, 0xc0000a9460, 0x0, 0x2b, 0xc000abce80, 0x8)
	/usr/local/go/src/sort/zfuncversion.go:87 +0x452
sort.quickSort_func(0xc0005ebd38, 0xc0000a9460, 0x0, 0x2b, 0xc)
	/usr/local/go/src/sort/zfuncversion.go:143 +0x9a
sort.Slice(0x211d400, 0xc0000a9420, 0xc0005ebd38)
	/usr/local/go/src/sort/slice.go:21 +0x129
github.com/vmware/octant/pkg/navigation.CRDEntries(0x29b8620, 0xc0001d1860, 0xc00133d140, 0x34, 0xc0011cffa7, 0x7, 0x29cd260, 0xc0012108a0, 0x0, 0x0, ...)
	/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:79 +0x124
github.com/vmware/octant/internal/octant.(*NavigationFactory).genNode(0xc00014c780, 0x29b8620, 0xc0001d1860, 0x23d9308, 0x10, 0x27d7158, 0xc0008c8400, 0x3d88460, 0x10085dc)
	/go/src/github.com/vmware/octant/internal/octant/factory.go:115 +0x269
github.com/vmware/octant/internal/octant.(*NavigationFactory).Generate.func1(0xc000000008, 0x27da070)
	/go/src/github.com/vmware/octant/internal/octant/factory.go:83 +0xeb
github.com/vmware/octant/vendor/golang.org/x/sync/errgroup.(*Group).Go.func1(0xc00077e5a0, 0xc001355140)
	/go/src/github.com/vmware/octant/vendor/golang.org/x/sync/errgroup/errgroup.go:57 +0x57
created by github.com/vmware/octant/vendor/golang.org/x/sync/errgroup.(*Group).Go
	/go/src/github.com/vmware/octant/vendor/golang.org/x/sync/errgroup/errgroup.go:54 +0x66
@denis-cq
Copy link

denis-cq commented Aug 9, 2019

same error with rook crd:

`2019-08-09T12:42:04.884+0300 ERROR navigation/navigation.go:125 cephclusters.ceph.rook.io: crd conversion failed: cannot convert int64 to float64
github.com/vmware/octant/pkg/navigation.CustomResourceDefinitions
/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:125
github.com/vmware/octant/pkg/navigation.CRDEntries
/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:74
github.com/vmware/octant/internal/octant.(*NavigationFactory).genNode
/go/src/github.com/vmware/octant/internal/octant/factory.go:115
github.com/vmware/octant/internal/octant.(*NavigationFactory).Generate.func1
/go/src/github.com/vmware/octant/internal/octant/factory.go:83
github.com/vmware/octant/vendor/golang.org/x/sync/errgroup.(*Group).Go.func1
/go/src/github.com/vmware/octant/vendor/golang.org/x/sync/errgroup/errgroup.go:57
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1e16d69]

goroutine 176 [running]:
github.com/vmware/octant/pkg/navigation.CRDEntries.func1(0x0, 0xc, 0x1)
/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:80 +0x49
sort.doPivot_func(0xc00019fd38, 0xc00100c940, 0x0, 0x10, 0xc000f66060, 0x8)
/usr/local/go/src/sort/zfuncversion.go:89 +0x416
sort.quickSort_func(0xc00019fd38, 0xc00100c940, 0x0, 0x10, 0xa)
/usr/local/go/src/sort/zfuncversion.go:143 +0x9a
sort.Slice(0x211d400, 0xc00100c920, 0xc00019fd38)
/usr/local/go/src/sort/slice.go:21 +0x129
github.com/vmware/octant/pkg/navigation.CRDEntries(0x29b8620, 0xc000ee6ba0, 0xc000128680, 0x34, 0xc001044027, 0x7, 0x29cd260, 0xc00125a840, 0x0, 0x0, ...)
/go/src/github.com/vmware/octant/pkg/navigation/navigation.go:79 +0x124
github.com/vmware/octant/internal/octant.(*NavigationFactory).genNode(0xc0001aa540, 0x29b8620, 0xc000ee6ba0, 0x23d9308, 0x10, 0x27d7158, 0xc001168320, 0x3d99460, 0x10085dc)
/go/src/github.com/vmware/octant/internal/octant/factory.go:115 +0x269
github.com/vmware/octant/internal/octant.(*NavigationFactory).Generate.func1(0x8, 0x27da070)
/go/src/github.com/vmware/octant/internal/octant/factory.go:83 +0xeb
github.com/vmware/octant/vendor/golang.org/x/sync/errgroup.(*Group).Go.func1(0xc0008ced50, 0xc0011c0340)
/go/src/github.com/vmware/octant/vendor/golang.org/x/sync/errgroup/errgroup.go:57 +0x57
created by github.com/vmware/octant/vendor/golang.org/x/sync/errgroup.(*Group).Go
/go/src/github.com/vmware/octant/vendor/golang.org/x/sync/errgroup/errgroup.go:54 +0x66`

bryanl referenced this issue in bryanl/octant Aug 9, 2019
The default unstructured converter can't convert int64 to float64. This change vendors a version that adds that functionality.

#143
@bryanl
Copy link
Contributor

bryanl commented Aug 9, 2019

I've identified the cause of this issue. In client-go, there is no code for converting an int64 to float64 when using the unstructured object converter. The fix in #145 vendors a patched version of the converter that handles the use case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants