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

configurable plugin restart limit #1246

Closed
krzysztofx opened this issue Sep 30, 2016 · 6 comments
Closed

configurable plugin restart limit #1246

krzysztofx opened this issue Sep 30, 2016 · 6 comments

Comments

@krzysztofx
Copy link

krzysztofx commented Sep 30, 2016

Hi

Would it be possible to expose currently hardcoded limit as a part of global configuration ? I mean MaxPluginRestartCount = 3 from control/runner.go .
Since snap currently doesn't give any means for controlled plugin reload, that would be workaround for situations where plugin has to be restarted.

Thanks

@IRCody
Copy link
Contributor

IRCody commented Sep 30, 2016

@krzysztofx: It's definitely possible. I'd be interested to know if anyone else has run into this issue.

@obourdon
Copy link
Contributor

obourdon commented Oct 4, 2016

@krzysztofx I'd be interested in knowing in which use cases this occurs and needs to be fixed

@krzysztofx
Copy link
Author

krzysztofx commented Oct 4, 2016

Hi
I'm developing some plugin for getting DPDK statistics. Brief picture is that collector plugin process attaches to primary DPDK process as a secondary . When primary restarts for some reason, secondary has invalid memory handlers to common memory area, so it has to reintialize it . Unfortunatelly current DPDK libraries implementation is lacking memory reinitialization routines, so the only and recommended way to reconnect with primary DPDK process is to restart secondary process and establish DPDK connectivity anew.
Simplest workaround is to terminate snap collector plugin and expect snapd to resurrect it . So we need to extend or disable plugin restart limitation.
I can imagine more complex solution/feature where plugin could request it's own renitialization from Snap core process, but I'm afraid it's not something that we can get quickly.

Thanks
Krzysztof

@krzysztofx
Copy link
Author

Hi
@obourdon @IRCody
Do you know if there's any chance for exposing that parameter in near future ?

Thanks
Krzysztof

@bjray
Copy link
Contributor

bjray commented Nov 17, 2016

@krzysztofx - we are a bit short staffed over the holidays, and our next 2 weeks are already planned. We will try to pull it in before the end of the year.

IRCody pushed a commit to IRCody/snap that referenced this issue Dec 6, 2016
Makes the MaxPluginRestartCount configurable from controls config
section in the globalconfig file. Updates the example configs to
include this field and adds tests for parsing of this option.
kjlyon added a commit that referenced this issue Dec 8, 2016
Fixes #1246: Makes plugin restart limit configurable
@mbbroberg
Copy link
Contributor

Hey @krzysztofx! Your request landed in master as of the PR mentioned above. Hope it helps you out! Let us know if you need it as part of our next public version of Snap or you're comfortable building from source.

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

6 participants