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

[BUG] Netreap exits with zero code when shouldn't #31

Open
DevKhaverko opened this issue Nov 10, 2023 · 6 comments
Open

[BUG] Netreap exits with zero code when shouldn't #31

DevKhaverko opened this issue Nov 10, 2023 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@DevKhaverko
Copy link

DevKhaverko commented Nov 10, 2023

Describe the bug

After failing on node reaper or endpoint reaper netreap exits with 0 code

To Reproduce

Steps to reproduce the behavior:

  1. Run netreap as system job
  2. In one time you can get the error 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)

  • linux/amd64
  • Netreap version:0.1.2

If you ran into this issue while developing a feature for Netreap:

  • Output of cilum version e.g.:
v1.13.2
  • Output of nomad version e.g.:
Nomad v1.6.1

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

@DevKhaverko DevKhaverko added bug Something isn't working help wanted Extra attention is needed labels Nov 10, 2023
@DevKhaverko DevKhaverko changed the title [BUG] <Issue> [BUG] Netreap exits with zero code when shouldn't Nov 10, 2023
@deverton-godaddy
Copy link
Contributor

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.

@DevKhaverko
Copy link
Author

NETREAP_DEBUG was set to 1

@DevKhaverko
Copy link
Author

log from this line
zap.L().Debug("Got error message from node event channel", zap.Error(events.Err))

@DevKhaverko
Copy link
Author

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?

@DevKhaverko
Copy link
Author

I've opened PR
#34

@deverton
Copy link
Contributor

deverton commented Mar 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants