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

Plugin API, TaskStats not called after RecoverTask after plugin restart #5936

Closed
towe75 opened this issue Jul 7, 2019 · 3 comments · Fixed by #5948
Closed

Plugin API, TaskStats not called after RecoverTask after plugin restart #5936

towe75 opened this issue Jul 7, 2019 · 3 comments · Fixed by #5948

Comments

@towe75
Copy link
Contributor

towe75 commented Jul 7, 2019

Nomad version

Nomad v0.9.3 (c5e8b66)

Operating system and Environment details

Ubuntu 18.04

Issue

I am working on a driver plugin and i miss stats if the plugin dies and restarts.

My plugin reports stats fine when a task is initially started. So i can see in the logs that "TaskStats" is called and i can watch metrics in the nomad web-ui.

Now, if i kill the plugin process (not nomad itself!) in order to simulate a crash, i can see that "RecoverTask" is invoked. The callback is handled well and i am able to control the task just fine.

"TaskStats", however, is not called after recovery and thus the plugin does not stream stats into nomad resulting in a stuck graph in the UI.

@preetapan
Copy link
Member

Thanks for reporting this, I was able to reproduce this with the existing LXC driver

@towe75
Copy link
Contributor Author

towe75 commented Jul 9, 2019

Thanks for checking!
Killing a plugin process is actually a nice shortcut for updating a plugin while working on the code base. It's much quicker compared to restarting a nomad agent. Automatic task recovery ensures a consistent in-memory state as well.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants