当您使用可组合网络时,process-templates.py 脚本会呈现静态模板,使其包含您在 network_data.yaml 和 roles_data.yaml 文件中定义的网络和角色。确保您的渲染的 NIC 模板包含以下项目:
每个角色(包括自定义可组合网络)的静态文件。
每个角色的每个静态文件都包含正确的网络定义。
每个静态文件都需要自定义网络的所有参数定义,即使角色上未使用了网络。检查以确保渲染的模板包含这些参数。例如,如果只将 StorageBackup 网络添加到 Ceph 节点,则所有角色的 NIC 配置模板中的 parameter 部分还包括此定义:
parameters:
...
StorageBackupIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
...
parameters:
...
StorageBackupIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
...
Copy to ClipboardCopied!Toggle word wrapToggle overflow
如果需要,您还可以包含 VLAN ID 和/或网关 IP 的参数定义:
parameters:
...
StorageBackupNetworkVlanID:
default: 60
description: Vlan ID for the management network traffic.
type: number
StorageBackupDefaultRoute:
description: The default route of the storage backup network.
type: string
...
parameters:
...
StorageBackupNetworkVlanID:
default: 60
description: Vlan ID for the management network traffic.
type: number
StorageBackupDefaultRoute:
description: The default route of the storage backup network.
type: string
...
Copy to ClipboardCopied!Toggle word wrapToggle overflow