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

Discovery preformance #1021

Merged
merged 10 commits into from
Aug 14, 2023
Merged

Discovery preformance #1021

merged 10 commits into from
Aug 14, 2023

Conversation

Avi-Robusta
Copy link
Contributor

Notes:
needed to use os._exit(1) to kill robusta process

_thread.interrupt_main() still keeps other threads alive but calls handle_sigint in a parent thread
(~10 threads killed, the rest are still alive image taken after interrupt_main called and see from logs robusta still runs)
Screen Shot 2023-08-08 at 9 15 59
sys.exit will only exit the current child thread so its not an option from watchdog

@Avi-Robusta
Copy link
Contributor Author

replaced os.exit with sending the signal directly to the parent process -> sys.exit is called on correct thread.
Robusta container is restarted, stack dump present in previous logs

not critical since thread will be ended anyways by parent
Copy link
Contributor

@arikalon1 arikalon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

I think we might be able to simplify it a little, left some comments

src/robusta/core/sinks/robusta/robusta_sink.py Outdated Show resolved Hide resolved
src/robusta/core/sinks/robusta/robusta_sink.py Outdated Show resolved Hide resolved
@Avi-Robusta Avi-Robusta enabled auto-merge (squash) August 14, 2023 06:35
@Avi-Robusta Avi-Robusta merged commit 3f3f75d into master Aug 14, 2023
12 checks passed
@Avi-Robusta Avi-Robusta deleted the discovery_preformance branch August 14, 2023 06:42
pavangudiwada pushed a commit that referenced this pull request Aug 21, 2023
* added watchdog thread for discovery

* fixing thread start

* reducing stack traces

* pod restart working

* better comments

* fixed watchdog restart pod

* returning from thread

not critical since thread will be ended anyways by parent

* PR changes

* updated exit

* removing unneeded import
pavangudiwada pushed a commit to pavangudiwada/robusta that referenced this pull request Nov 6, 2023
* added watchdog thread for discovery

* fixing thread start

* reducing stack traces

* pod restart working

* better comments

* fixed watchdog restart pod

* returning from thread

not critical since thread will be ended anyways by parent

* PR changes

* updated exit

* removing unneeded import
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 this pull request may close these issues.

2 participants