8.3. 更新记录集
默认情况下,任何用户可以更新 Red Hat OpenStack Platform DNS 服务(指定)记录集。
先决条件
-
管理员已为您创建一个项目,并为您提供了一个
clouds.yaml文件来访问云。 python-openstackclient软件包驻留在您的工作站上。$ dnf list installed python-openstackclient- 您的项目必须拥有要更新记录集的区域。
流程
确认为您的云设置了系统
OS_CLOUD变量:$ echo $OS_CLOUD my_cloud如果需要,重置变量:
$ export OS_CLOUD=my_other_cloud作为替代方案,您可以在每次运行
openstack命令时添加--os-cloud <cloud_name> 选项指定云名称。您可以使用
openstack recordset set命令修改记录集。Example
在本例中,用户正在更新记录设置
web.example.com.使其包含两个记录:$ openstack recordset set example.com. web.example.com. --record 192.0.2.5 --record 192.0.2.6注意更新记录集时,您可以通过其 ID 或其名称来识别该记录。如果使用其名称,则必须使用完全限定域名(FQDN)。
验证
运行 list 命令以确认您的修改。
Example
$ openstack recordset list -c name -c type -c records example.com.输出示例
+------------------+------+----------------------------------------------+ | name | type | records | +------------------+------+----------------------------------------------+ | example.com. | SOA | ns1.example.net. admin.example.com 162001261 | | | | 6 3599 600 86400 3600 | | | | | | example.com. | NS | ns1.example.net. | | | | | | web.example.com. | A | 192.0.2.5 192.0.2.6 | | | | | | www.example.com. | A | 192.0.2.1 | +------------------+------+----------------------------------------------+