intelsdi-x / snap

The open telemetry framework
http://snap-telemetry.io
Apache License 2.0
1.8k stars 294 forks source link

same nested processor plugins with different configs and ConfigBasedRouter - error selecting plugin #1745

Open michep opened 7 years ago

michep commented 7 years ago

If there is a processor plugin with Routing Strategy set to ConfigBasedRouter, and have it twice in the same task with different configs, then there is en error while running processing job: "could not select a plugin _block=findAvailablePlugin _module=control-routing error=0 of 1 plugins are available strategy=config-based"

Expected result: processor plugin whould be instantiated twice as there are two different configurations for the same plugin.

Test processor plugin code is here: https://gist.github.com/michep/e654485aa2cffa8f1ecd9687791d9174 Test snap task is here: https://gist.github.com/michep/86bd5e22b7a20d3fb05d9a508e5e75db Additional plugins required: iostat collector and file publisher

taotod commented 6 years ago

@michep Thanks for your question. The usage of config-based strategy is below. "ConfigRouting is routing to plugins based on the config provided to the plugin. Using this strategy enables a running database plugin that has the same connection info between two tasks to be shared." If two task processor configs are same, there is no issue to run these two tasks. What is your usage to start processor plugin with the configured-based strategy and run two tasks?

michep commented 6 years ago

@taotod This was not a question about how config-based routing works, this is an issue because config-based routing is not working as it should. All necessary info is in initial issue description - test procesor plugin code and test task. Please pay attention to that gists and afterwards, if the questions remain, I'm open for discussion.