Open DevKhaverko opened 1 year ago
Can you run with NETREAP_DEBUG
set to 1
and see if you can reproduce the error? That should log a lot more context so we can try and track this down.
NETREAP_DEBUG was set to 1
log from this line
zap.L().Debug("Got error message from node event channel", zap.Error(events.Err))
it's hard to debug why nomad sends events with error sometimes maybe you don't need to shutdown netreap when this error happens? what do you think?
I've opened PR https://github.com/cosmonic/netreap/pull/34
What's your experience with this patch? When we tried it we found the reaper gets stuck in an infinite loop since the event stream seems to be broken at that point.
EDIT: Nevermind, I think this just a silly bug on my branch.
Describe the bug
After failing on node reaper or endpoint reaper netreap exits with 0 code
To Reproduce
Steps to reproduce the behavior:
Got error message from node event channel: {"error" : invalid character 'e' looking for beginning of value"}
Expected behavior
Netreap exits with non-zero code, so nomad sees it like failed allocation, not like normal exiting.
Environment (please complete the following information)
If you ran into this issue while developing a feature for Netreap:
cilum version
e.g.:nomad version
e.g.:Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I think nomad sends wrong event and it's bug of nomad, but netreap should handle it correctly