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

Adds subscription groups and simplifies the interaction between scheduler and control #1146

Merged
merged 2 commits into from
Aug 17, 2016

Conversation

jcooklin
Copy link
Collaborator

Fixes #832, #852, #1052
Closes #997

Simplified interaction between scheduler and control. Introduces new subscription mechanism with task view. Plugin loading/unloading triggers subscribtion/unsubscribtions from pools.

Link to design document

Summary of changes:

  • subscriptionGroups in pluginControl for storing (requests, expanded metrics, plugins and configuration)
  • No more expanding metrics on each collect job
  • ValidateDeps takes care of expanding metrics when task is created
  • subscriptionGroups are added/removed when tasks are started/stopped (SubscribeDeps/UnsubscribeDeps)
  • CollectMetrics leverages subscriptionGroups
  • subscriptionGroups are processed on plugin load/unload events
  • No need for bound vs unbound subscriptions with respect to pools

scenarios

  • [upgrade collector] load plugin mock v1, start task mock-file.yaml (not pinned), load mock v2
  • Expected mock v1 is unsubscribed (not running), mock v2 is subscribed (running)
    scenario1
  • [downgrade collector] load plugin mock v2, start task mock-file.yaml (not pinned), load v1
  • Expected mock v2 is subscribed and running, mock v1 is loaded (not running)
    scenario2
  • [a dynamic metric request] load plugin mock v1, start task dynamic-mock-file.yaml, load another-mock
  • Expected another-mock is subscribed to by our task
    scenario3

Testing done:

  • unit tests
  • manual

@intelsdi-x/snap-maintainers

Mateusz Kleina and others added 2 commits August 16, 2016 21:46
- subscriptionGroups maintain a view of requested metrics, expanded
  metrics, plugins and metric configuration per subscription group
- subscriptionGroups maintain a view of requested metrics, expanded metrics plugins and metric configuration per subscription group
- subscriptionGroups are added/removed when tasks are stopped/started (SubscribeDeps/UnsubscribeDeps)
- subscriptionGroups are processed on plugin load and unload events
  - processing a subscriptionGroup involves determing the resulting metrics from the requested metrics and subscribing/unsubscribing to plugins as necessary
- Removes the need for bound vs unbound subscriptions with respect to plugin pools
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