shifu icon indicating copy to clipboard operation
shifu copied to clipboard

[Bug] deviceshifu crash when telemtrySettings omit

Open rhoninl opened this issue 1 year ago • 0 comments

Describe the bug

A clear and concise description of what the bug is. deviceshifu crash when using socket for it's telemtrySettings is omit

To Reproduce

Steps to reproduce the behavior:

  1. ... install shifu crd
  2. ...apply socket_config.yaml
  3. ...
  4. ...
  telemetries: |
    telemetries:

Expected behavior Running deviceshifu succeed A clear and concise description of what you expected to happen.

Log Output

If applicable, add logs to help explain your problem.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xaf0404]

goroutine 23 [running]:
github.com/edgenesis/shifu/deviceshifu/pkg/deviceshifubase.getTelemetryCollectionServiceMap(0x4000127470)
        /shifu/deviceshifu/pkg/deviceshifubase/telemetry_service.go:49 +0x74
github.com/edgenesis/shifu/deviceshifu/pkg/deviceshifubase.(*DeviceShifuBase).StartTelemetryCollection(0x4000127470, 0x0?)
        /shifu/deviceshifu/pkg/deviceshifubase/deviceshifubase.go:221 +0x68
created by github.com/edgenesis/shifu/deviceshifu/pkg/deviceshifubase.(*DeviceShifuBase).Start
        /shifu/deviceshifu/pkg/deviceshifubase/deviceshifubase.go:257 +0x11c

Server (please complete the following information):

  • Shifu Version: [e.g. v0.0.5] v0.0.5
  • Kubernetes distro [e.g. K8s, K3s] kind
  • Version [e.g. v1.24.0] v0.14.0
  • CPU Architecture [e.g. amd64, arm64w] arm64

Additional context

Add any other context about the problem here.

rhoninl avatar Aug 26 '22 07:08 rhoninl