Skip to content
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

type assertion failure right after startup #68

Closed
grimmy opened this issue Aug 19, 2024 · 2 comments · Fixed by #69
Closed

type assertion failure right after startup #68

grimmy opened this issue Aug 19, 2024 · 2 comments · Fixed by #69
Assignees

Comments

@grimmy
Copy link
Contributor

grimmy commented Aug 19, 2024

Trying to run this against salt 2017.7.7 but I'm getting a type assertion failure right after startup. Not sure if this is due to old salt or what, hoping you can provide some insight? I can provide a fix assuming you're open to it but if this is a version thing then I'm sure there's probably more things like this to find too.

panic: interface conversion: interface {} is string, not []uint8

goroutine 9 [running]:
github.com/kpetremann/salt-exporter/pkg/parser.Event.Parse({_}, _)
	/home/runner/work/salt-exporter/salt-exporter/pkg/parser/parser.go:98 +0xa6c
github.com/kpetremann/salt-exporter/pkg/listener.(*EventListener).ListenEvents(0xc0000760f0)
	/home/runner/work/salt-exporter/salt-exporter/pkg/listener/listener.go:127 +0x16f
created by main.start in goroutine 1
	/home/runner/work/salt-exporter/salt-exporter/cmd/salt-exporter/main.go:72 +0x467
@kpetremann
Copy link
Owner

hello @grimmy,

Indeed this version of Salt is quite old, and not supported/tested.

I did a quick test using the docker-compose from e2e_test directory (using 2017.7.8).
I can't reproduce it. It does not trigger the panic and I see metrics.

Could you please provide more info regarding:

  • What kind of state/module is triggering the panic?
  • Salt exporter configuration
  • Salt master configuration
  • version of your dependencies, especially msgpack

@kpetremann
Copy link
Owner

PR merged, fix available in v0.11.1.
Thanks again for reporting the issue and bringing the fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants