[Openstack] object-oriented design in nova--room for improvement?

Joshua Harlow harlowja at yahoo-inc.com
Thu Aug 22 03:04:04 UTC 2013


There is always room for improvement I hope ;)

+openstack-dev (I think where u wanted this to go).

A question, are u thinking about organizing the 'metadata' associated with
resources?

If so it might be interesting to see if there could be a grand unification
around something like 'ResourceTracker' & 'Stats' that exposes 'metadata'
(different types) via an API that all the other classes could use? Is that
inline of what u are thinking?? Sort of like a resource + metadata
'database' that everyone uses (and accesses and updates via a single set
of APIs).

I might have misread your idea though.

On 8/21/13 7:55 PM, "Chris Friesen" <chris.friesen at windriver.com> wrote:

>
>Hi,
>
>I'm pretty new to OpenStack, so maybe I'm still not grokking the overall
>design.  Feel free to tell me I'm totally full of it. :)
>
>Anyways, I've been poking around in the code with an eye towards maybe
>extending the set of information exported by the compute nodes for use
>in scheduler filters.
>
>I started putting together a list of areas that would need to be
>updated, and it seems like there are quite a few separate chunks of code
>all over the codebase that are aware of the details of what is exported:
>
>
>LibvirtDriver class
>Claim² class
>ComputeNode class
>compute_node_statistics() in sqlalchemy/api.py
>ServiceCommands class (to show host resources)
>ResourceTracker class (to track used/free resources)
>Stats class
>FakeDriver class
>HostState class in libvirt/driver.py
>json/xml stuff in nova/doc/api_samples
>HostController class
>make_hypervisor() in compute/plugins/v3/hypervisors.py
>HypervisorStatisticsTemplate API class
>HypervisorsController API class
>HostController API class
>SchedulerManager class
>
>
>I've probably missed some, the above was generated looking for cases of
>"vcpus_used".
>
>Maybe I'm dreaming, but it seems like there should be a way to do this
>more efficiently rather than manually copying knowledge into different
>parts of the code.
>
>Thoughts?
>
>Chris
>
>_______________________________________________
>Mailing list: 
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>Post to     : openstack at lists.openstack.org
>Unsubscribe : 
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack





More information about the Openstack mailing list