Merge lp://qastaging/~sandy-walsh/nova/zone-add-uses-zone-name into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by Sandy Walsh
Status: Merged
Approved by: Matt Dietz
Approved revision: 1534
Merged at revision: 1611
Proposed branch: lp://qastaging/~sandy-walsh/nova/zone-add-uses-zone-name
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 800 lines (+193/-72)
12 files modified
nova/api/openstack/servers.py (+41/-0)
nova/api/openstack/zones.py (+1/-1)
nova/compute/api.py (+2/-4)
nova/db/sqlalchemy/migrate_repo/versions/048_add_zone_name.py (+35/-0)
nova/db/sqlalchemy/models.py (+1/-0)
nova/rpc/impl_kombu.py (+0/-1)
nova/scheduler/abstract_scheduler.py (+2/-1)
nova/scheduler/api.py (+37/-21)
nova/scheduler/zone_manager.py (+12/-5)
nova/tests/scheduler/test_scheduler.py (+43/-27)
nova/tests/test_zones.py (+18/-11)
tools/pip-requires (+1/-1)
To merge this branch: bzr merge lp://qastaging/~sandy-walsh/nova/zone-add-uses-zone-name
Reviewer Review Type Date Requested Status
Matt Dietz (community) Approve
Jason Kölker (community) Approve
Review via email: mp+75651@code.qastaging.launchpad.net

Commit message

Keystone support in Nova across Zones.

Description of the change

This branch allows nova to reuse keystone auth tokens in cross-zone situations. Additionally it cleans up some of the exception handling in sub-zones (converting novaclient exceptions to webob-compatible exceptions).

In the case where Nova is acting by itself (like a scheduler polling a child), it will use the admin credentials provided. Otherwise, if a user token exists, the operation will be relayed to the child zones as that user.

Endpoints from the Keystone Service Catalog are now used to identify Zone endpoints. This is a reversal of the direction-of-communication from the original Zones implementation (where the endpoint was supplied by the admin in the 'nova zone-add' command). Now a zone name is supplied and used as the key in the 'nova' Service Catalog for the endpoint.

Watch this video for a demo: http://www.darksecretsoftware.com/static/videos/keystone-nova-zones.mp4
(the 404 bug is fixed now)

To post a comment you must log in.
Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

I should add that this merge prop requires the following keystone branch
https://review.openstack.org/#change,359

and the python-novaclient 2.6.5 pull request
https://github.com/rackspace/python-novaclient/pull/118

to land first.

Revision history for this message
Jason Kölker (jason-koelker) wrote :

Is Bueno. There is a stray import of webob in scheduler/api.py that is never used.

review: Approve
Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

Whoopsy ... that was a straggler from an experiment. Thanks.

Don't want to pollute the service.api space with HTTP stuff.

Revision history for this message
Matt Dietz (cerberus) wrote :

Channeling Rick, here's some femto-nits

17 + def __init__(self, code, title, explaination):
18 + self.code = code
19 + self.title = title
20 + self.explaination = explaination

(Only kind of) Sorry for being an ass, but it's "explanation"

345 + def _wrap_method(function, arg1, arg2):
346 """Wrap method to supply an argument."""
347 def _wrap(*args, **kwargs):
348 - return function(arg1, *args, **kwargs)
349 + return function(arg1, arg2, *args, **kwargs)

377 - _wrap_method(_process, func), zone_list)]
378 + _wrap_method(_process, func, context), zone_list)]

i think functools.partial would cover this, though I'm not entirely sure...

442 - return f(*args, **kwargs)
443 + ret = f(*args, **kwargs)
444 + return ret

This looks like a remnant of some debugging?

review: Needs Fixing
1534. By Sandy Walsh

trunk merge fixup

Revision history for this message
Matt Dietz (cerberus) wrote :

Delicious

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.