Re: [openstack-dev] [ceilometer] Discussion of the resource loader support patch

2014-01-22 Thread Lu, Lianhao
Gordon Chung wrote on 2014-01-21:
 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.
 
 i don't have any particular opposition to the code.
 
 i have two questions, the first is related to validation. if we load a list 
 of resources from pipeline.yaml and another 'loader' source, what
 happens when the same resource(s) are listed in both pipeine.yaml and 
 'loader' source. do we just let it continue with duplicates or do we
 try to filter?

No, we'll remove the duplication, so the final resources passed to the pollster 
don't have this kind of duplication.

 also, another question would be, what other type of 'loaders' are there aside 
 from fileloader? i don't really have any ideas outside of
 fileloader so it'd be interesting to know of other use-cases.
 

Maybe a DB loader to load the resources from a central management DB, maybe a 
HTTP loader to query for resources definition using restful APIs, etc. 

Lianhao


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [ceilometer] Discussion of the resource loader support patch

2014-01-19 Thread Lu, Lianhao
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
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev