yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #01780
[Bug 1156490] Re: There is a chance to call conductor_api in the driver before the conductor_api is initialized
Reviewed: https://review.openstack.org/25274
Committed: http://github.com/openstack/nova/commit/8cab8ed7294c776a18e560a0c89f4e1ae18c2d46
Submitter: Jenkins
Branch: milestone-proposed
commit 8cab8ed7294c776a18e560a0c89f4e1ae18c2d46
Author: Russell Bryant <rbryant@xxxxxxxxxx>
Date: Thu Mar 21 15:08:18 2013 -0400
Initialize compute manager before loading driver.
The compute virt API uses the conductor API instance on the compute
manager. Make sure the compute manager has been fully initialized
before loading the driver and passing it the virtapi instance. This
prevents the possibility of the driver calling back into the compute
manager and using something not initialized yet, such as the conductor
API in the case of this bug.
This patch also moves initialization of a member variable up above
super(), where the rest of the initialization is. There doesn't appear
to be a reason for needing to have it at the end.
Fix bug 1156490.
Change-Id: I19684f24d590201d135336107425c2be2f74c83e
(cherry picked from commit 9075069098e32b47bd5011e2653a23b61c18d4a3)
** Changed in: nova
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1156490
Title:
There is a chance to call conductor_api in the driver before the
conductor_api is initialized
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
Many functions use self._compute.conductor_api in class ComputeVirtAPI(virtapi.VirtAPI):
so during the driver loading (or the function __init__() of the driver), the driver has the chance to call conductor_api.
But conductor_api is initialized later than the driver loading, there will be some issue :
"ComputeManager object has no attribute 'conductor_api' "
https://github.com/openstack/nova/blob/master/nova/compute/manager.py
class ComputeManager(manager.SchedulerDependentManager):
"""Manages the running instances from creation to destruction."""
RPC_API_VERSION = '2.27'
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.conductor_api = conductor.API()
...
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1156490/+subscriptions