3

我在 10.10.70.25 vm 中安装了 bind9,并且我的 openstack-designate 在 10.10.70.81 vm 中运行。

bind9 和指定的 rndc.key 相同。

指定的 rndc.key 位于 /home/syed/bind/rndc.key

下面是我的 /home/syed/bind/rndc.conf 在指定(10.10.70.81)

key "rndc-key" {
    algorithm hmac-md5;
    secret "shTCHuGbqgAzKdL8+MTCIg==";
};
options {
    default-key "rndc-key";
    default-server 10.10.70.25;
    default-port 953;
};

下面是我的 /etc/designate/designate.conf 的 bind9 部分

[backend:agent:bind9]

#
# From designate.agent
#

# RNDC Host (string value)
rndc_host = 10.10.70.25

# RNDC Port (integer value)
rndc_port = 953

# RNDC Config File (string value)
rndc_config_file = /home/syed/bind/rndc.conf

# RNDC Key File (string value)
rndc_key_file = /home/syed/bind/rndc.key

# Path where zone files are stored (string value)
zone_file_path = /etc/bind

# Host to query when finding zones (string value)
query_destination = 127.0.0.1

下面是我在 bind9 (10.10.70.25) 中的 named.conf

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

key "rndc-key" {
        algorithm hmac-md5;
        secret "shTCHuGbqgAzKdL8+MTCIg==";
};

controls {
    inet 10.10.70.25 port 953
    allow { 10.10.70.81; } keys { "rndc-key"; };
};

当我跑步时

rndc -c  /home/syed/bind/rndc.conf -k /home/syed/bind/rndc.key status

它显示“服务器已启动并正在运行”

当我跑步时

openstack 区域创建 --email admin@syedinttest5.org corp.syedinttest5.org。

我收到权限被拒绝错误

Command: sudo designate-rootwrap /etc/designate/rootwrap.conf rndc -s 10.10.70.25 -p 953 -c /home/syed/bind/rndc.conf -k /home/syed/bind/rndc.key addzone corp.syedinttest11.org  { type slave; masters { 10.10.70.81 port 5354;}; file "slave.corp.syedinttest11.org.faaf39d3-3745-49b4-a840-aefea6570ae4"; };
Exit code: 1
Stdout: u''
Stderr: u"rndc: 'addzone' failed: permission denied\n"
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service Traceback (most recent call last):
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service   File "/opt/stack/designate/designate/pool_manager/service.py", line 462, in _create_zone_on_target
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service     backend.create_zone(context, zone)
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service   File "/opt/stack/designate/designate/backend/impl_bind9.py", line 98, in create_zone
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service     self._execute_rndc(rndc_op)
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service   File "/opt/stack/designate/designate/backend/impl_bind9.py", line 144, in _execute_rndc
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service     raise exceptions.Backend(e)
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service Backend: Unexpected error while running command.
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service Command: sudo designate-rootwrap /etc/designate/rootwrap.conf rndc -s 10.10.70.25 -p 953 -c /home/syed/bind/rndc.conf -k /home/syed/bind/rndc.key addzone corp.syedinttest11.org  { type slave; masters { 10.10.70.81 port 5354;}; file "slave.corp.syedinttest11.org.faaf39d3-3745-49b4-a840-aefea6570ae4"; };
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service Exit code: 1
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service Stdout: u''
2018-02-12 04:15:46.282 TRACE designate.pool_manager.service Stderr: u"rndc: 'addzone' failed: permission denied\n"

1.如何解决错误 2.如果我要设置bind9服务器,是否总是slave来指定mdns??

4

0 回答 0