在Openstack中,RPC调用是通过RabbitMQ进行的。

任何一个RPC调用,都有Client/Server两部分,分别在rpcapi.py和manager.py中实现。

这里以nova-scheduler调用nova-compute为例子。

nova/compute/rpcapi.py中有ComputeAPI

nova/compute/manager.py中有ComputeManager

两个类有名字相同的方法,nova-scheduler调用ComputeAPI中的方法,通过底层的RabbitMQ,就能到达nova-compute的ComputeManager中的方法。

本文主要分析这个过程。

ComputeAPI.run_instance()的调用过程如下:

Openstack中RabbitMQ RPC代码分析

nova-compute监听消息,将消息dispatch到ComputeManager的run_instance()方法。

Openstack中RabbitMQ RPC代码分析

相关文章:

  • 2022-01-18
  • 2021-11-27
  • 2022-12-23
  • 2021-12-05
  • 2021-06-25
  • 2022-12-23
  • 2022-01-08
  • 2021-09-22
猜你喜欢
  • 2021-04-21
  • 2021-05-09
  • 2021-11-15
  • 2021-07-20
  • 2021-09-11
  • 2021-11-07
  • 2021-09-28
相关资源
相似解决方案