将 prep_resize 移动到 Conductor

https://blueprints.launchpad.net/nova/+spec/move-prep-resize-to-conductor

为了准备将调度器分离成一个独立的项目,我们需要移除调度器到计算节点的所有代理调用。prep_resize() 仍然存在于 Scheduler V3 API 中,因此我们需要修改冷迁移的重试方式。

问题描述

当请求冷迁移时,Conductor 到 Compute 的 prep_resize() 调用是直接的,这没问题。问题在于冷迁移失败时,计算节点通过调用 scheduler.prep_resize() 请求调度器重新安排新的迁移,而 scheduler.prep_resize() 又会在发出 select_destinations() 后调用 compute.prep_resize()。

提议的变更

想法是在 compute 的 prep_resize 方法中,用 conductor.migrate_server 替换 scheduler.prep_resize() 的调用。

备选方案

所有 prep_resize 逻辑都应该留给 Conductor 处理,但这比仅仅将调度器的逻辑移动到 Conductor 更大的一步。考虑到小步迭代,这个蓝图实现起来更快且风险更小,因此另一个将冷迁移和热迁移放置到 Conductor 的蓝图 [1] 可以将其作为依赖项。

数据模型影响

REST API 影响

安全影响

通知影响

其他最终用户影响

性能影响

其他部署者影响

开发人员影响

实现

负责人

主要负责人

sylvain-bauza

其他贡献者

工作项

  • 在 compute.prep_resize 中,将对 scheduler.prep_resize() 的调用替换为对 conductor.migrate_server() 的调用

  • 移除 Scheduler RPC API 中的 prep_resize,并在 manager 中注明将其移除

依赖项

测试

涵盖了现有的 tempest 测试和 CI。

文档影响

参考资料