5.16. 将网络接口模板转换为新结构
在以前的版本中,网络接口结构使用 OS::Heat::StructuredConfig 资源来配置接口:
现在,模板使用 OS::Heat::SoftwareConfig 资源进行配置:
此配置获取存储在 $network_config 变量中的接口配置,并将它注入为 run-os-net-config.sh 脚本的一部分。
警告
必须更新网络接口模板以使用这个新结构,并检查您的网络接口模板仍然符合 语法。不这样做可能会导致在快进升级过程中造成失败。
director 的 Heat 模板集合包含一个脚本,可帮助您将模板转换为这种新格式。此脚本位于 /usr/share/openstack-tripleo-heat-templates/tools/yaml-nic-config-2-script.py 中。例如:
/usr/share/openstack-tripleo-heat-templates/tools/yaml-nic-config-2-script.py \
--script-dir /usr/share/openstack-tripleo-heat-templates/network/scripts \
[NIC TEMPLATE] [NIC TEMPLATE] ...
$ /usr/share/openstack-tripleo-heat-templates/tools/yaml-nic-config-2-script.py \
--script-dir /usr/share/openstack-tripleo-heat-templates/network/scripts \
[NIC TEMPLATE] [NIC TEMPLATE] ...
重要
在使用此脚本时,请确保您的模板不包含任何注释行。这在解析旧模板结构时可能会导致错误。
如需更多信息,请参阅 "网络隔离 "。