10.2. 导出 DNS 服务池配置
您可以使用 DNS 池配置的副本来对 Red Hat OpenStack Platform (RHOSP) DNS 服务(指定)进行故障排除。
在 RHOSP 17.1 中,不支持多个池。
流程
登录到其中一个 Controller 节点,并向控制台显示当前运行的 DNS 服务池配置。
Example
在本例中,管理员通过 SSH 以
tripleo-admin用户身份访问 Controller 节点controller-0.ctlplane,并执行在designate_central容器中运行的designate-manage pool show_config命令:$ ssh tripleo-admin@controller-0.ctlplane sudo podman exec \ designate_central designate-manage pool show_config输出示例
Pool Configuration: ------------------- also_notifies: [] attributes: {} description: Default Pool id: 794ccc2c-d751-44fe-b57f-8894c9f5c842 name: default nameservers: - host: 192.0.2.111 port: 53 - host: 192.0.2.109 port: 53 - host: 192.0.2.131 port: 53 ns_records: - hostname: ns2.example.com. priority: 2 - hostname: ns1.example.com. priority: 1 - hostname: ns3.example.com. priority: 3 targets: - description: BIND9 Server 3 masters: - host: 192.0.2.137 port: 16002 - host: 192.0.2.137 port: 16001 - host: 192.0.2.137 port: 16000 options: host: 192.0.2.111 port: '53' rndc_config_file: /etc/designate/private/bind3.conf rndc_host: 192.0.2.111 rndc_port: '953' type: bind9 - description: BIND9 Server 2 masters: - host: 192.0.2.137 port: 16001 - host: 192.0.2.137 port: 16002 - host: 192.0.2.137 port: 16000 options: host: 192.0.2.131 port: '53' rndc_config_file: /etc/designate/private/bind2.conf rndc_host: 192.0.2.131 rndc_port: '953' type: bind9 - description: BIND9 Server 1 masters: - host: 192.0.2.137 port: 16002 - host: 192.0.2.137 port: 16001 - host: 192.0.2.137 port: 16000 options: host: 192.0.2.109 port: '53' rndc_config_file: /etc/designate/private/bind1.conf rndc_host: 192.0.2.109 rndc_port: '953' type: bind9如果要将当前池配置导出到文件,请使用
designate-manage pool generate_file命令。Example
在本例中,管理员通过 SSH 通过 SSH 访问 Controller 节点
controller-0.ctlplane,并执行在designate_central容器中运行的 designate-manage pool generate_file --file <file_name> 命令。DNS 服务将当前池配置导出到由-file 选项指定的文件,在本例中为~/my_dns_service_config.yaml:$ ssh tripleo-admin@controller-0.ctlplane sudo podman exec \ designate_central designate-manage pool generate_file \ --file ~/my_dns_service_config.yaml提示使用
podman cp命令将容器中的文件复制到您的本地系统。