diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-03-25 17:37:07 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-03-25 17:37:07 +0000 |
commit | 0a8834d700d7d481e06a4e31114b9c8d1b08988b (patch) | |
tree | f02752919d53053f1f71df64eb38875be24e3a47 | |
parent | 040640cbfb741207a793b790526369f63dd1775f (diff) | |
parent | 8cab8ed7294c776a18e560a0c89f4e1ae18c2d46 (diff) | |
download | nova-0a8834d700d7d481e06a4e31114b9c8d1b08988b.tar.gz |
Merge "Initialize compute manager before loading driver." into milestone-proposed
-rwxr-xr-x | nova/compute/manager.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 6043627830..fda7f490ad 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -329,7 +329,6 @@ class ComputeManager(manager.SchedulerDependentManager): def __init__(self, compute_driver=None, *args, **kwargs): """Load configuration options and connect to the hypervisor.""" self.virtapi = ComputeVirtAPI(self) - self.driver = driver.load_compute_driver(self.virtapi, compute_driver) self.network_api = network.API() self.volume_api = volume.API() self._last_host_check = 0 @@ -343,11 +342,15 @@ class ComputeManager(manager.SchedulerDependentManager): openstack_driver.is_quantum_security_groups()) self.consoleauth_rpcapi = consoleauth.rpcapi.ConsoleAuthAPI() self.cells_rpcapi = cells_rpcapi.CellsAPI() + self._resource_tracker_dict = {} super(ComputeManager, self).__init__(service_name="compute", *args, **kwargs) - self._resource_tracker_dict = {} + # NOTE(russellb) Load the driver last. It may call back into the + # compute manager via the virtapi, so we want it to be fully + # initialized before that happens. + self.driver = driver.load_compute_driver(self.virtapi, compute_driver) def _get_resource_tracker(self, nodename): rt = self._resource_tracker_dict.get(nodename) |