Add dns-servers config option for upstream dns servers
Adds a dns-servers config option for specifying the forwarding dns servers to be used by the dnsmasq services on the neutron dhcp agent. This enables services using internal dns to also specify the forwarding dns servers in order to resolve hosts outside of the neutron network space. Change-Id: I3cd608b1491a45f565d5147894b8285e638eeaa7 Implements: blueprint internal-dns Closes-Bug: #1713721
This commit is contained in:
parent
72435d9d9f
commit
2b2c4b745f
@ -166,6 +166,12 @@ options:
|
||||
description: |
|
||||
Comma-separated list of key=value config flags with the additional
|
||||
dhcp options for neutron dnsmasq.
|
||||
dns-servers:
|
||||
type: string
|
||||
default:
|
||||
description: |
|
||||
A comma-separated list of DNS servers which will be used by dnsmasq as
|
||||
forwarders.
|
||||
enable-l3-agent:
|
||||
type: boolean
|
||||
default: True
|
||||
|
@ -90,6 +90,7 @@ class NeutronGatewayContext(NeutronAPIContext):
|
||||
'debug': config('debug'),
|
||||
'verbose': config('verbose'),
|
||||
'instance_mtu': config('instance-mtu'),
|
||||
'dns_servers': config('dns-servers'),
|
||||
'l2_population': api_settings['l2_population'],
|
||||
'enable_dvr': api_settings['enable_dvr'],
|
||||
'enable_l3ha': api_settings['enable_l3ha'],
|
||||
|
@ -13,6 +13,10 @@ debug = {{ debug }}
|
||||
dnsmasq_config_file = /etc/neutron/dnsmasq.conf
|
||||
{% endif -%}
|
||||
|
||||
{% if dns_servers -%}
|
||||
dnsmasq_dns_servers = {{ dns_servers }}
|
||||
{% endif -%}
|
||||
|
||||
{% if dns_domain -%}
|
||||
dns_domain = {{ dns_domain }}
|
||||
# Per LP#1583769, dhcp_domain needs to be configured as well. Additional
|
||||
|
@ -162,6 +162,7 @@ class TestNeutronGatewayContext(CharmTestCase):
|
||||
self.test_config.set('instance-mtu', 1420)
|
||||
self.test_config.set('dnsmasq-flags', 'dhcp-userclass=set:ipxe,iPXE,'
|
||||
'dhcp-match=set:ipxe,175')
|
||||
self.test_config.set('dns-servers', '8.8.8.8,4.4.4.4')
|
||||
self.test_config.set('vlan-ranges',
|
||||
'physnet1:1000:2000 physnet2:2001:3000')
|
||||
self.test_config.set('flat-network-providers', 'physnet3 physnet4')
|
||||
@ -177,6 +178,7 @@ class TestNeutronGatewayContext(CharmTestCase):
|
||||
'shared_secret': 'testsecret',
|
||||
'enable_dvr': True,
|
||||
'enable_l3ha': True,
|
||||
'dns_servers': '8.8.8.8,4.4.4.4',
|
||||
'dns_domain': 'openstack.example.',
|
||||
'local_ip': '10.5.0.1',
|
||||
'instance_mtu': 1420,
|
||||
@ -233,6 +235,7 @@ class TestNeutronGatewayContext(CharmTestCase):
|
||||
'shared_secret': 'testsecret',
|
||||
'enable_dvr': True,
|
||||
'enable_l3ha': True,
|
||||
'dns_servers': None,
|
||||
'dns_domain': 'openstack.example.',
|
||||
'local_ip': '192.168.20.2',
|
||||
'instance_mtu': 1420,
|
||||
|
Loading…
Reference in New Issue
Block a user