Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Plugins started on unsuccessful task start are not stopped #1210

Closed
geauxvirtual opened this issue Sep 15, 2016 · 5 comments
Closed

Plugins started on unsuccessful task start are not stopped #1210

geauxvirtual opened this issue Sep 15, 2016 · 5 comments

Comments

@geauxvirtual
Copy link
Contributor

After creating a task, if the task is stopped and a plugin is removed that the task needs, attempting to start the task will result in starting the plugins required for the task, but not stopping those plugins when the task fails to start due to a missing required plugin. There is no way to stop these plugins without stopping snapd.

@lynxbat
Copy link
Contributor

lynxbat commented Sep 15, 2016

Would a plugin existence check on start solve this?

@geauxvirtual
Copy link
Contributor Author

Code currently tries to subscribe to dependencies and then tries to unsubscribe from dependencies if any error is found during subscription. This doesn't look to be stopping the started plugins though.

https://github.com/intelsdi-x/snap/blob/master/scheduler/scheduler.go#L486-L510

@geauxvirtual
Copy link
Contributor Author

I believe the problems lies here https://github.com/intelsdi-x/snap/blob/master/scheduler/scheduler.go#L500. We are ranging over subbedDeps, but nothing actually sets subbedDeps, so this slice is empty.

@geauxvirtual
Copy link
Contributor Author

To expand on the last comment, there is only one dependency group created for the task. subbedDeps is only added to if all subscriptions succeed. If an error occurs during subscription of dependencies, then the code tries to iterate over subbedDeps which has not been added to yet.

@lynxbat
Copy link
Contributor

lynxbat commented Sep 15, 2016

Nice catch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants