20.5. 取消置备和删除 Controller 节点
要取消置备和删除 Controller 节点,请完成以下步骤。
流程
Source
stackrc
文件:$ source ~/stackrc
确定
overcloud-controller-0
节点的 UUID:(undercloud)$ NODE=$(metalsmith -c UUID -f value show overcloud-controller-0)
把节点设为维护模式:
$ openstack baremetal node maintenance set $NODE
复制
overcloud-baremetal-deploy.yaml
文件:$ cp /home/stack/templates/overcloud-baremetal-deploy.yaml /home/stack/templates/unprovision_controller-0.yaml
在
unprovision_controller-0.yaml
文件中,降低 Controller 数量来取消置备您要替换的 Controller 节点。在本例中,计数从3
减少到2
。将controller-0
节点移到实例
字典中,并将provisioned
参数设置为false
:- name: Controller count: 2 hostname_format: controller-%index% defaults: resource_class: BAREMETAL.controller networks: [ ... ] instances: - hostname: controller-0 name: <IRONIC_NODE_UUID_or_NAME> provisioned: false - name: Compute count: 2 hostname_format: compute-%index% defaults: resource_class: BAREMETAL.compute networks: [ ... ]
运行
node unprovision
命令:$ openstack overcloud node delete \ --stack overcloud \ --baremetal-deployment /home/stack/templates/unprovision_controller-0.yaml
The following nodes will be unprovisioned: +--------------+-------------------------+--------------------------------------+ | hostname | name | id | +--------------+-------------------------+--------------------------------------+ | controller-0 | baremetal-35400-leaf1-2 | b0d5abf7-df28-4ae7-b5da-9491e84c21ac | +--------------+-------------------------+--------------------------------------+ Are you sure you want to unprovision these overcloud nodes and ports [y/N]?
选填
删除 ironic 节点:
$ openstack baremetal node delete <IRONIC_NODE_UUID>
-
将
IRONIC_NODE_UUID
替换为节点的 UUID。