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

pulsar monitor --all generates loop of events #128

Closed
MatteoNardi opened this issue Jan 17, 2023 · 0 comments · Fixed by #129
Closed

pulsar monitor --all generates loop of events #128

MatteoNardi opened this issue Jan 17, 2023 · 0 comments · Fixed by #129
Assignees
Labels
bug Something isn't working

Comments

@MatteoNardi
Copy link
Contributor

#122 introduced the possibility to monitor pulsar events from the cli client pulsar-exec pulsar. The issue is that unless the pulsar-exec binary is added to the process filtering whitelist, running pulsar monitor --all will trigger a loop of events, making the whole output very hard to understand:

  • Traffic between pulsard and pulsar happens over a unix socket, using a websocket
  • This will make network-monitor generate Receive events for pulsar
  • These events will be sent over the websocket
  • This will generate more traffic, which in turn will generate more events, creating a loop

For a similar reason, we ignore all events coming from the same PID as the running pulsard executable:
https://github.com/Exein-io/pulsar/blob/cf8469e47e0fa6714853291fbb38574517ac7d33/modules/process-monitor/src/filtering/initializer.rs#L166-L172

While the cleanest solution would be to add pulsar-exec to the configuration process-monitor.whitelist_children, this would be easy to forget. We'd like to improve the default behavior, so we've decided to:

  • Automatically add the current process executable path to the whitelist_children (this works because pulsard and pulsar share the same executable, pulsar-exec)
  • Add an option to optionally disable this behavior
@MatteoNardi MatteoNardi added the bug Something isn't working label Jan 17, 2023
@MatteoNardi MatteoNardi self-assigned this Jan 17, 2023
MatteoNardi added a commit that referenced this issue Jan 17, 2023
Fix #128 by whitelisting the current process path instead of the current
PID. This allows to ignore the client CLI executable. Failing to ignore
it would lead to loops of events, see issue #128 for more details.

Add option `process-monitor.ignore_self`, which can be used to disable
this default behaviour.
@MatteoNardi MatteoNardi linked a pull request Jan 17, 2023 that will close this issue
4 tasks
MatteoNardi added a commit that referenced this issue Jan 19, 2023
Fix #128 by whitelisting the current process path instead of the current
PID. This allows to ignore the client CLI executable. Failing to ignore
it would lead to loops of events, see issue #128 for more details.

Add option `process-monitor.ignore_self`, which can be used to disable
this default behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant