4.11. 为 Control Plane 设置名称服务器
如果您希望 overcloud 解析外部主机名,如 cdn.redhat.com,请在 overcloud 节点上设置名称服务器。对于没有进行网络隔离的标准 overcloud,名称服务器会使用 undercloud 的 control plane 子网来定义。完成以下过程为环境定义名称服务器。
步骤
查找
stackrc文件,以启用 director 命令行工具:[stack@director ~]$ source ~/stackrc为
ctlplane-subnet子网设置名称服务器:(undercloud) [stack@director images]$ openstack subnet set --dns-nameserver [nameserver1-ip] --dns-nameserver [nameserver2-ip] ctlplane-subnet请为每一个名称服务器使用
--dns-nameserver选项。查看子网来验证名称解析服务器:
(undercloud) [stack@director images]$ openstack subnet show ctlplane-subnet +-------------------+-----------------------------------------------+ | Field | Value | +-------------------+-----------------------------------------------+ | ... | | | dns_nameservers | 8.8.8.8 | | ... | | +-------------------+-----------------------------------------------+
重要
如果要将服务流量隔离到单独的网络,overcloud 节点必须使用网络环境文件中的 DnsServer 参数。您还必须将 control plane 名称服务器和 DnsServers 参数设置为相同的 DNS 服务器。