Hi CM guys,

jd__ wanted to hold off the patch https://review.openstack.org/58747 because he 
thinks it's not generic enough and want to have a further discussion about the 
resource loader support. So I put it here my original thought and design about 
the patch as a start point.

The initial intension is to allow loading new resources(endpoints) without 
modifying the pipeline configuration file or restarting the central agent. If 
the admin sets the resource loader in the resources filed in the pipeline file, 
e.g.
    resources:
        - fileloader:///foo/bar
The central agent's PollingTask would use the corresponding resource loader to 
load new resources, every polling interval time before getting the samples from 
the pollsters for those endpoints. In the above configuration example, the file 
resource loader would read the resources definition from the file /foo/bar and 
pass those to the pollsters. The resource loader implementation can have its 
own internal cache, like the file resource loader, so it doesn't mean it has to 
open and read the whole file every polling time unless the corresponding file 
is updated.

If the resources defined in the pipeline doesn't match any resource file 
loader, it will be treated as directly passing to the pollsters. E.g.
    resources:
        - fileloader:///foo/bar
        - snmp://2.2.2.2
The endpoint 'snmp://2.2.2.2' will be passed to the pollsters along with the 
those read from the file /foo/bar.

Any comment?

p.s. Another patch https://review.openstack.org/#/c/58489/ for the same bp was 
approved before, but it failed in the gate test due to another previously 
merged patch. I've resolved that issue and would like to see reviews on this 
too. Thanks!

Best Regards,
-Lianhao Lu

_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to