4.9. 为 Control Plane 设置名称服务器

如果您希望 overcloud 解析外部主机名,如 cdn.redhat.com,建议您在 overcloud 节点上设置名称服务器。对于没有进行网络隔离的标准 overcloud,名称服务器会使用 undercloud 的控制平面子网来定义。完成以下过程为环境定义名称服务器。

步骤

  1. 查找 stackrc 文件,以启用 director 的命令行工具:

    [stack@director ~]$ source ~/stackrc
  2. ctlplane-subnet 子网设置名称服务器:

    (undercloud) [stack@director images]$ openstack subnet set --dns-nameserver [nameserver1-ip] --dns-nameserver [nameserver2-ip] ctlplane-subnet

    请为每一个名称服务器使用 --dns-nameserver 选项。

  3. 查看子网来验证名称解析服务器:

    (undercloud) [stack@director images]$ openstack subnet show ctlplane-subnet
    +-------------------+-----------------------------------------------+
    | Field             | Value                                         |
    +-------------------+-----------------------------------------------+
    | ...               |                                               |
    | dns_nameservers   | 8.8.8.8                                       |
    | ...               |                                               |
    +-------------------+-----------------------------------------------+
重要

如果要将服务流量隔离到单独的网络,overcloud 节点将使用网络环境配置文件中的 DnsServer 参数。