Show Table of Contents
9.2. 删除 Compute 节点
在某些情况下,您可能需要从 Overcloud 中删除节点。例如,需要替换一个有问题的 Compute 节点。
重要
在从 Overcloud 中删除一个 Compute 节点前,把这个节点上的负载迁移到其它 Compute 节点上。请参阅 第 8.9 节 “从一个 Overcloud Compute 节点中迁移虚拟机”。
接下来,在 Overcloud 中禁用节点的 Compute 服务。这会停止在此节点上调度新的实例。
$ source ~/stack/overcloudrc $ nova service-list $ nova service-disable [hostname] nova-compute $ source ~/stack/stackrc
删除 Overcloud 节点需要使用本地模板文件对 director 中的
overcloud 栈进行更新。首先,找到 Overcloud 栈的 UUID:
$ heat stack-list
找到要被删除的节点的 UUID:
$ nova list
运行以下命令来从栈中删除节点,并相应地更新计划:
$ openstack overcloud node delete --stack [STACK_UUID] --templates -e [ENVIRONMENT_FILE] [NODE1_UUID] [NODE2_UUID] [NODE3_UUID]
重要
如果您在创建 Overcloud 时传递了额外的环境变量,使用
-e 或 --environment-file 选项再次传递它们来避免对 Overcloud 的不必要的改变。
最后,从 nova 中删除节点的 Compute 服务:
$ source ~/stack/overcloudrc $ nova service-delete [service-id] $ source ~/stack/stackrc
现在,可以安全地把节点从 Overcloud 中删除,并用于其它目的。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.