4.5. 为虚拟 IP 地址设置子网
Controller 角色通常为每个网络托管虚拟 IP (VIP)地址。默认情况下,overcloud 从每个网络的基本子网获取 VIP,但 control plane 除外。control plane 使用 ctlplane-subnet,这是在标准 undercloud 安装过程中创建的默认子网名称。
在这种 spine leaf 场景中,默认基础调配网络为 leaf0,而不是 ctlplane-subnet。这意味着,您必须在 VipSubnetMap 参数中添加覆盖值,以更改 control plane VIP 使用的子网。
另外,如果每个网络的 VIP 没有使用一个或多个网络的基本子网,您必须将额外的覆盖添加到 VipSubnetMap 参数,以确保 director 在连接到 Controller 节点的 L2 网络段的子网中创建了 VIP。
流程:
-
创建名为
spine-leaf-vips.yaml的文件,并编辑该文件。 在文件中创建一个
parameter_defaults部分,并根据您的要求添加VipSubnetMap参数:如果将
leaf0用于 provisioning / control plane 网络,请将ctlplaneVIP 重新映射设置为leaf0:parameter_defaults: VipSubnetMap: ctlplane: leaf0如果您将不同的 Leaf 用于多个 VIP,请设置 VIP 重新映射以满足这些要求。例如,使用以下代码片段将
VipSubnetMap参数配置为对所有 VIP 使用leaf1:parameter_defaults: VipSubnetMap: ctlplane: leaf1 redis: internal_api_leaf1 InternalApi: internal_api_leaf1 Storage: storage_leaf1 StorageMgmt: storage_mgmt_leaf1
-
保存
spine-leaf-vips.yaml文件。