bl4ko/netbox-ssot

vcenter null pointer due to irresponsive node

TaLoN1x opened this issue · 9 comments

If ESXi node is not available, I get this nullpointer:

[signal SIGSEGV: segmentation violation code=0x1 addr=0x170 pc=0xa56b73]

goroutine 13 [running]:
github.com/bl4ko/netbox-ssot/internal/source/vmware.(*VmwareSource).syncHostPhysicalNics(_, , {{{{{...}, {...}, {...}}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...}}, ...}, ...}, ...)
/Users/jurikononov/src/netbox-ssot/internal/source/vmware/vmware_sync.go:285 +0x93
github.com/bl4ko/netbox-ssot/internal/source/vmware.(*VmwareSource).syncHostNics(
, _, {{{{{...}, {...}, {...}}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...}}, ...}, ...}, ...)
/Users/jurikononov/src/netbox-ssot/internal/source/vmware/vmware_sync.go:261 +0x65
github.com/bl4ko/netbox-ssot/internal/source/vmware.(*VmwareSource).syncHosts(0xc000dae000, 0xc0000da000)
/Users/jurikononov/src/netbox-ssot/internal/source/vmware/vmware_sync.go:246 +0xb6a
github.com/bl4ko/netbox-ssot/internal/source/vmware.(*VmwareSource).Sync(0xc000dae000, 0xc0000da000)
/Users/jurikononov/src/netbox-ssot/internal/source/vmware/vmware.go:209 +0x2fb
main.main.func1({0xf3bbb8, 0xc000da0570}, {0xf39e70, 0xc000dae000})
/Users/jurikononov/src/netbox-ssot/cmd/netbox-ssot/main.go:98 +0x2f1
created by main.main in goroutine 1
/Users/jurikononov/src/netbox-ssot/cmd/netbox-ssot/main.go:78 +0x67e

Thanks for reporting the issue. Could you provide the full log with DEBUG level?

Please find batch of last logs below. I did obfuscate some values. someserver.local is p
hysical node of cluster that is unavailable (disconnected).

sample.log

This log seems odd to me. How is it possible that IP addresses and interfaces for eevcenter source are synced before device data. Did you rename more than one source to eevcenter?

I had some nodes defined manually in netbox. It wasnät the first run for bath either, I had some null pointers I mentioned earlier, that I worked around with if smth == nil {return} ugly hack :)

Oh, I see so you are altering source code. The error says the panic occurs on

/Users/jurikononov/src/netbox-ssot/internal/source/vmware/vmware_sync.go:443 +0x4d

Which is empty line in main branch.

Could you first report issues in the main source code so I can test them and fix them?

yeah, my bad. let me revert it and provide new log.

sample.log
this should make more sence now. Sorry for creating a confusion.

this fix resolved null pointer.