diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-06-23 22:48:44 -0700 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-06-23 22:48:44 -0700 |
| commit | 72d478b3ac12033928a53d51aa9c0ffbdfc9907f (patch) | |
| tree | 2c25d9f55baa75f23e4d33d5cbbfa1aff1fcee8e | |
| parent | 2c303bcc8f47aaa5cdeee0ee91e3f4b434176f15 (diff) | |
debug logging of number of instances to build in scheduler
| -rw-r--r-- | nova/scheduler/zone_aware_scheduler.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nova/scheduler/zone_aware_scheduler.py b/nova/scheduler/zone_aware_scheduler.py index 073bdd3bd..a747526d1 100644 --- a/nova/scheduler/zone_aware_scheduler.py +++ b/nova/scheduler/zone_aware_scheduler.py @@ -180,18 +180,21 @@ class ZoneAwareScheduler(driver.Scheduler): request_spec, kwargs) return None + num_instances = request_spec['num_instances'] + LOG.debug(_("Attemping to build %d instance%s") % + (num_instances, "" if num_instances == 1 else "s")) + # Create build plan and provision ... build_plan = self.select(context, request_spec) if not build_plan: raise driver.NoValidHost(_('No hosts were available')) - for num in xrange(request_spec['num_instances']): + for num in xrange(num_instances): if not build_plan: break - item = build_plan.pop(0) - self._provision_resource(context, item, instance_id, request_spec, - kwargs) + self._provision_resource(context, item, instance_id, + request_spec, kwargs) # Returning None short-circuits the routing to Compute (since # we've already done it here) |
