2.4. 将裸机节点端口映射到 control plane 网络段
要在 L3 路由网络上启用部署,您必须在裸机端口上配置 physical_network
字段。每个裸机端口都与 OpenStack Bare Metal (ironic)服务中的裸机节点关联。物理网络名称是您在 undercloud 配置中的 subnets
选项中包含的名称。
undercloud.conf
文件中指定为 local_subnet
的子网物理网络名称始终命名为 ctlplane
。
流程
Source
stackrc
文件:source ~/stackrc
$ source ~/stackrc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 检查裸机节点:
openstack baremetal node list
$ openstack baremetal node list
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 确保裸机节点处于
enroll
或manageable
状态。如果裸机节点不在这些状态之一,在 baremetal 端口上设置physical_network
属性的命令会失败。要将所有节点设置为manageable
状态,请运行以下命令:for node in $(openstack baremetal node list -f value -c Name); do openstack baremetal node manage $node --wait; done
$ for node in $(openstack baremetal node list -f value -c Name); do openstack baremetal node manage $node --wait; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 检查哪些 baremetal 端口与哪些 baremetal 节点关联:
openstack baremetal port list --node <node-uuid>
$ openstack baremetal port list --node <node-uuid>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 为端口设置
physical-network
参数。在以下示例中,在配置中定义三个子网:leaf0
,leaf1
, 和leaf2
。local_subnet 是leaf0
。由于local_subnet
的物理网络始终为ctlplane
,因此连接到leaf0
的 baremetal 端口使用 ctlplane。剩余的端口使用其他 leaf 名称:openstack baremetal port set --physical-network ctlplane <port-uuid> openstack baremetal port set --physical-network leaf1 <port-uuid> openstack baremetal port set --physical-network leaf2 <port-uuid>
$ openstack baremetal port set --physical-network ctlplane <port-uuid> $ openstack baremetal port set --physical-network leaf1 <port-uuid> $ openstack baremetal port set --physical-network leaf2 <port-uuid>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在部署 overcloud 之前内省节点。包括
--all-manageable
and--provide 选项来将节点设置为可用于部署:openstack overcloud node introspect --all-manageable --provide
$ openstack overcloud node introspect --all-manageable --provide
Copy to Clipboard Copied! Toggle word wrap Toggle overflow