当我使用 openvswitch 时,Resolvconf 没有生成名称服务器 IP?

当我使用 openvswitch 时,Resolvconf 没有生成名称服务器 IP?

为什么 resolvconf 不能生成 dns-server 或者如何排除故障?

root@openstack-controller-01[Standby]:/home/user01# cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
root@openstack-controller-01[Standby]:/home/user01# 

我配置了 /etc/network/interfaces 如下。

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
  bond-master bond0

auto br-ex
allow-ovs br-ex
iface br-ex inet static
  address 172.25.53.61
  netmask 255.255.0.0
  gateway 172.25.0.1
  dns-nameservers 8.8.8.8
  ovs_type OVSBridge
  ovs_ports br-ex
  ethtool -K bond0 gro off
  pre-up ifup bond0
  post-up ovs-vsctl add-port br-ex bond0
  post-down ifdown bond0

auto bond0
iface bond0 inet manual
  up ip address add 0/0 dev $IFACE
  up ip link set $IFACE up promisc on
  down ip link set $IFACE down promisc off
  down ifconfig $IFACE down
  slaves none
  xmit-hash-policy layer2+3
  ovs_bridge br-ex
  ovs_type OVSPort
  pre-up ifup eth0
  post-down ifdown eth0

auto eth1
iface eth1 inet manual
  bond-master bond1

auto bond1
iface bond1 inet static
  address 192.168.1.61
  netmask 255.255.255.0
  xmit-hash-policy layer2+3
  slaves none
  pre-up ifup eth1
  post-down ifdown eth1

然后,我确认了其他节点。
它仅设置了绑定配置。

auto bond0
iface bond0 inet static
        address 192.168.0.5
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 8.8.8.8
        dns-search local.mki
        slaves eth0
        xmit-hash-policy layer2+3

auto eth0
iface eth0 inet manual
        bond-master bond0


auto bond1
iface bond1 inet static
        address 192.168.1.5
        netmask 255.255.255.0
        slaves eth1
        xmit-hash-policy layer2+3

auto eth1
iface eth1 inet manual
        bond-master bond1

此节点具有正确的名称服务器设置。

root@openstack-compute-01:/home/user01# cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
search local.mki
root@openstack-compute-01:/home/user01# 

我认为这与 openvswitch 有关,但我不确定。
如果您有任何知识,请告诉我。

非常感谢。

相关内容