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

(SDI-2393) Fix #1448 log and document maxpluginrestarts #1456

Merged
merged 1 commit into from
Jan 6, 2017

Conversation

nanliu
Copy link
Contributor

@nanliu nanliu commented Jan 5, 2017

Fixes #1448

Summary of changes:

  • support -1 for max_plugin_restarts, so it works better with max-failure: -1.
  • improve logging of MaxPluginRestarts so users are aware why a plugin is disabled.
  • document changes and relationship to max-failure settings.

Example of disabling plugin due to exceeding maxpluginrestartcount:

time="2017-01-04T17:31:25-08:00" level=warning msg="plugin disabled due to exceeding restart limit: 10" _block=handle-events _module=control-runner plugin-name=opentsdb plugin-version=9

Testing done:

  • manual kill of publisher plugin

@intelsdi-x/snap-maintainers

"restart_count": pool.RestartCount(),
"_block": "handle-events",
"plugin-name": v.Name,
"plugin-version": v.Version,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not clear what the difference is between v.Name + v.Version and v.String. Right before we log this we log an error with "aplugin": v.String. Not sure what the difference is but it seems like we should be consistent? I tried looking into core/control_event for the definitions of DeadAvailablePluginEvent but it's not commented on what the fields are meant to hold.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed to v.String since that provides more info such as plugin type.

* support -1 for max_plugin_restarts, so it works better with max-failure:
-1.
* improve logging of MaxPluginRestarts so users are aware why a plugin is
disabled.
* document changes and relationship to max-failure settings.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants