diff options
| author | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-05-24 05:45:22 -0700 |
|---|---|---|
| committer | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-05-24 05:45:22 -0700 |
| commit | e49bb59db9e9e40eb9941b51403f87b95671752a (patch) | |
| tree | dccd8b1f83e636701564503c645cb7b0bac82cc9 | |
| parent | 758d60ccede696c1ef52488c90da7b80b807dedf (diff) | |
| parent | 9a2c944be8e7187a12bfd363a2a74325403e00d8 (diff) | |
| download | nova-e49bb59db9e9e40eb9941b51403f87b95671752a.tar.gz nova-e49bb59db9e9e40eb9941b51403f87b95671752a.tar.xz nova-e49bb59db9e9e40eb9941b51403f87b95671752a.zip | |
accepting calls
| -rw-r--r-- | nova/api/openstack/servers.py | 2 | ||||
| -rw-r--r-- | nova/api/openstack/zones.py | 5 | ||||
| -rw-r--r-- | nova/scheduler/api.py | 2 | ||||
| -rw-r--r-- | nova/scheduler/zone_aware_scheduler.py | 6 |
4 files changed, 9 insertions, 6 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py index 474695d98..f726a3709 100644 --- a/nova/api/openstack/servers.py +++ b/nova/api/openstack/servers.py @@ -190,7 +190,7 @@ class Controller(common.OpenstackController): inst['image_id'] = requested_image_id # TODO(sandy): REMOVE THIS - LOG.debug(_("***** INST = %(inst)s") % locals()) + LOG.debug(_("***** INST = %(inst)s") % locals()) #pep8 builder = self._get_view_builder(req) server = builder.build(inst, is_detail=True) diff --git a/nova/api/openstack/zones.py b/nova/api/openstack/zones.py index f9d933a50..96a6552b3 100644 --- a/nova/api/openstack/zones.py +++ b/nova/api/openstack/zones.py @@ -117,8 +117,9 @@ class Controller(common.OpenstackController): """Returns a weighted list of costs to create instances of desired capabilities.""" ctx = req.environ['nova.context'] - LOG.debug("INCOMING SELECT '%s'" % req.environ) - specs = json.loads(req.body) + json_specs = json.loads(req.body) + specs = json.loads(json_specs) + LOG.debug("INCOMING SELECT '%s'" % specs) build_plan = api.select(ctx, specs=specs) cooked = self._scrub_build_plan(build_plan) return {"weights": cooked} diff --git a/nova/scheduler/api.py b/nova/scheduler/api.py index 147a64798..f5b570dbd 100644 --- a/nova/scheduler/api.py +++ b/nova/scheduler/api.py @@ -137,7 +137,7 @@ def call_zone_method(context, method, errors_to_ignore=None, *args, **kwargs): def _error_trap(*args, **kwargs): try: - LOG.warn(_("*** CALLING ZONE") % locals())#asdads + LOG.warn(_("*** CALLING ZONE %(args)s ^^ %(kwargs)s") % locals())#asdads return zone_method(*args, **kwargs) except Exception as e: if type(e) in errors_to_ignore: diff --git a/nova/scheduler/zone_aware_scheduler.py b/nova/scheduler/zone_aware_scheduler.py index 8a3f6d64e..e37aa8487 100644 --- a/nova/scheduler/zone_aware_scheduler.py +++ b/nova/scheduler/zone_aware_scheduler.py @@ -21,6 +21,7 @@ across zones. There are two expansion points to this class for: """ import operator +import json import M2Crypto from nova import crypto @@ -201,10 +202,11 @@ class ZoneAwareScheduler(driver.Scheduler): # weighted = [{weight=weight, name=hostname}, ...] weighted = self.weigh_hosts(num_instances, request_spec, host_list) - LOG.debug(_("XXXXXXX - 3 - _SCHEDULE")) + LOG.debug(_("XXXXXXX - 3 - _SCHEDULE >> %s") % request_spec) # Next, tack on the best weights from the child zones ... + json_spec = json.dumps(request_spec) child_results = self._call_zone_method(context, "select", - specs=request_spec) + specs=json_spec) LOG.debug(_("XXXXXXX - 4 - _SCHEDULE - CHILD RESULTS %(child_results)s") % locals()) for child_zone, result in child_results: for weighting in result: |
