简体   繁体   English

如何在不关闭节点的情况下使nova服务状态出于测试目的?

[英]How to make nova service state down for test purpose without shutting down node?

I am testing nova evacuate command. 我正在测试nova evacuate命令。 I have 2 compute nodes and one of them has a running vm. 我有2个计算节点,其中一个具有运行中的vm。 I want to evacuate vm from one node to another and for that I need nova-compute service's state down on the host where vm is running now. 我想将虚拟机从一个节点转移到另一个节点,为此,我需要在虚拟机正在运行的主机上down nova-compute服务的状态。 I know I can achieve that by shutting down host node. 我知道我可以通过关闭主机节点来实现。 But I don't want to shut down any node. 但是我不想关闭任何节点。 I found commands to disable nova-compute service or delete nova-compute service but could not find for making state down of nova-compute service. 我找到了禁用nova-compute服务或删除nova-compute服务的命令,但是找不到使nova-compute服务处于关闭状态的命令。 Is there any way to achieve this? 有什么办法可以做到这一点?

There are new request method added in 2.11 microversion for services - force-down 在2.11 microversion中为服务添加了新的请求方法-强制关闭

It will change the state for hypervisor from UP to down. 它将管理程序的状态从UP更改为Down。 See the docs 查看文件

Note: if you change the state all VM will migrate by themselves 注意:如果您更改状态,则所有VM都会自行迁移

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM