Merge lp:~vishvananda/nova/orm_deux into lp:~hudson-openstack/nova/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Soren Hansen | ||||
Approved revision: | 379 | ||||
Merge reported by: | Vish Ishaya | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~vishvananda/nova/orm_deux | ||||
Merge into: | lp:~hudson-openstack/nova/trunk | ||||
Diff against target: |
21 lines (+2/-2) 1 file modified
nova/endpoint/cloud.py (+2/-2) |
||||
To merge this branch: | bzr merge lp:~vishvananda/nova/orm_deux | ||||
Related bugs: |
|
||||
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jay Pipes (community) | Approve | ||
Eric Day (community) | Approve | ||
Soren Hansen (community) | Needs Information | ||
Review via email: mp+34263@code.launchpad.net |
Description of the change
Proposing merge to get feedback on orm refactoring. I am very interested in feedback to all of these changes.
This is a huge set of changes, that touches almost all of the files. I'm sure I have broken quite a bit, but better to take the plunge now than to postpone this until later. The idea is to allow for pluggable backends throughout the code.
Brief Overview
For compute/
service - responsible for rpc
this currently uses the existing cast and call in rpc.py and a little bit of magic
to call public methods on the manager class.
each service also reports its state into the database every 10 seconds
manager - responsible for managing respective object classes
all the business logic for the classes go here
db (db_driver) - responsible for abstracting database access
driver (domain_driver) - responsible for executing actual shell commands and implementation
Compute hasn't been fully cleaned up, but to get an idea of how it works, take a look
at volume and network
Known issues/Things to be done:
* nova-api accesses db objects directly
It seems cleaner to have only the managers dealing with their respective objects. This would
mean code for 'run_instances' would move into the manager class and it would do the initial
setup and cast out to the remote service
* db code uses flat methods to define its interface
In my mind this is a little prettier as an abstract base class, but driver loading code
can load a module or a class. It works, so I'm not sure it needs to be changed but feel
free to debate it.
* Service classes have no code in them
Not sure if this is a problem for people, but the magic of calling the manager's methods is
done in the base class. We could remove the magic from the base class and explicitly
wrap methods that we want to make available via rpc if this seems nasty.
* AuthManager Projects/
In order for everything to live happily in the backend, we need some type
of adaptor for LDAP
* Context is not passed properly across rabbit
Context should probably be changed to a simple dictionary so that it can be
passed properly through the queue
* No authorization checks on access to objects
We need to decide on which layer auth checks should happen.
* Some of the methods in ComputeManager need to be moved into other layers/managers
* Compute driver layer should be abstracted more cleanly
* Flat networking is untested and may need to be reworked
* Some of the api commands are not working yet
* Nova Swift Authentication needs to be refactored(Todd is working on this)
Here are my notes and questions from the first pass through all this:
What is context used for in all the DB calls? Is it really needed? If it is, I think we should create instances of various objects and set it as a class instance member, not passed through to every method.
Why do we have services and managers? Seems like services should just be removed, or move manager->service. If we need a service wrapper around the manager, we could pass a manager class into nova/service.py directly to create the service, removing nova/{compute, network, ...}/service. py files entirely.
nova/datastore. old.py
Why is this still here?
nova/db/api.py
This should either be an interface class that IMPL overrides or not even have an API class and just document what methods an IMPL needs to provide.
nova/db/ sqlalchemy/ api.py
Again, class with methods (context being an instance member) would be cleaner. A
lso, some methods accept _context but then pass them through to other methods. T
he underscore should be removed in these cases.
nova/db/ sqlalchemy/ models. py
Why doesn't NovaBase inherit from BASE, instead of all models?
nova/virt/ libvirt_ conn.py libvirt_ conn.py, re-merge with trunk.
Text conflict in nova/virt/
run_tests.py model_unittest?
Replace/remove nova.tests.