Different between of the role of Nova-Conductor and Nova-Compute

Sean Mooney smooney at redhat.com
Mon Jan 9 18:54:42 UTC 2023


On Mon, 2023-01-09 at 16:49 +0700, Huy Võ Lê wrote:
> Hi, I have a question about Nova role
> 
> 
> - Assert: I don't understand about OPS/Redhat explaination. Because all of
> information said nova-conductor will help database-accessing for
> nova-compute, every chart/image showed, too.
> 
> - Reallity: When I download OPS Nova source code looked into
> nova/compute/manager.py, I saw the many many block code that queries the
> data from the database (instance list) and updates the data (instance.save).
> 
> So the assertion of the Openstack and Redhat development community is wrong
> or true????

the compute agent does not have the ablity to connect to the db directly.
even if you give it the db user name and passworkd.

before the conductor was intoduced the compute agents directly connected to the db to make changes.
this was seen as a possible security issue if the comptue host was compromised so nova was reacitected about 8 years ago.

as part of that reacitecutre the condoctor was intodouced and all db operations done by the compute were delegated to the conductor
via an rpc call.

so if the compute does instance.save() that save operation on the instance object does an rpc call to the conductor to save the instnace.

the local_condoctor mode that allowed the condutor code to be executed in the nova-compute process was removed in ocata
https://github.com/openstack/nova/commit/c36dbe1f721ea6ca6b083932c8f27022a03ddf53
after being deprecated in mitaka
https://github.com/openstack/nova/commit/0da0971cc44b93110032a3b382614f3f84297951


the role of the conductor is to orchserate all db interaction for compute service in a cell
and to orchastreate long running operatiosn like live migrate or server create.

for exampel when booting a vms which can take soem time to compelte we can execute that logic in the api.
similarly since we have not selected a host yet we cannot delegate the server creation to a comptue agent.
for such long running operations the conductor is used to execute teh task asyconously.

architecutaly  the conductor also plays other rules in a multi cell deployment.
for example compute agent are not ment to know what cell they are a memebr of. when doing a cross cell migrate
the supper conductor is responsible for managing the inter cell db operations.


> 
> Link 1:
> https://docs.openstack.org/nova/pike/install/get-started-compute.html
> Link 2:
> https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/8/html/configuration_reference_guide/section_conductor
> Link n: ....




More information about the openstack-discuss mailing list