Merge pull request #102 from thedac/do-not-set-dns
Stop setting external DNS
This commit is contained in:
@@ -127,18 +127,18 @@ class TestGenericUtils(ut_utils.BaseTestCase):
|
||||
|
||||
# Prefered OSCI TEST_ env vars
|
||||
_env = {"NET_ID": "netid",
|
||||
"NAMESERVER": "10.0.0.10",
|
||||
"NAME_SERVER": "10.0.0.10",
|
||||
"GATEWAY": "10.0.0.1",
|
||||
"CIDR_EXT": "10.0.0.0/24",
|
||||
"FIP_RANGE": "10.0.200.0:10.0.200.254",
|
||||
"TEST_NET_ID": "test_netid",
|
||||
"TEST_NAMESERVER": "10.9.0.10",
|
||||
"TEST_NAME_SERVER": "10.9.0.10",
|
||||
"TEST_GATEWAY": "10.9.0.1",
|
||||
"TEST_CIDR_EXT": "10.9.0.0/24",
|
||||
"TEST_FIP_RANGE": "10.9.200.0:10.0.200.254"}
|
||||
_expected_result = {}
|
||||
_expected_result["net_id"] = _env["TEST_NET_ID"]
|
||||
_expected_result["external_dns"] = _env["TEST_NAMESERVER"]
|
||||
_expected_result["external_dns"] = _env["TEST_NAME_SERVER"]
|
||||
_expected_result["default_gateway"] = _env["TEST_GATEWAY"]
|
||||
_expected_result["external_net_cidr"] = _env["TEST_CIDR_EXT"]
|
||||
_expected_result["start_floating_ip"] = _env[
|
||||
|
||||
@@ -172,10 +172,6 @@ def setup_sdn(network_config, keystone_session=None):
|
||||
network_config.get("private_net_cidr"),
|
||||
subnetpool=subnetpool,
|
||||
ip_version=ip_version)
|
||||
openstack_utils.update_subnet_dns(
|
||||
neutron_client,
|
||||
project_subnet,
|
||||
network_config["external_dns"])
|
||||
openstack_utils.plug_subnet_into_router(
|
||||
neutron_client,
|
||||
network_config["router_name"],
|
||||
|
||||
@@ -133,7 +133,7 @@ def get_undercloud_env_vars():
|
||||
export NET_ID="a705dd0f-5571-4818-8c30-4132cc494668"
|
||||
export GATEWAY="172.17.107.1"
|
||||
export CIDR_EXT="172.17.107.0/24"
|
||||
export NAMESERVER="10.5.0.2"
|
||||
export NAME_SERVER="10.5.0.2"
|
||||
export FIP_RANGE="172.17.107.200:172.17.107.249"
|
||||
|
||||
:returns: Network environment variables
|
||||
@@ -143,7 +143,7 @@ def get_undercloud_env_vars():
|
||||
# Note: TEST_* is the only prefix honored
|
||||
_vars = {}
|
||||
_vars['net_id'] = os.environ.get('TEST_NET_ID')
|
||||
_vars['external_dns'] = os.environ.get('TEST_NAMESERVER')
|
||||
_vars['external_dns'] = os.environ.get('TEST_NAME_SERVER')
|
||||
_vars['default_gateway'] = os.environ.get('TEST_GATEWAY')
|
||||
_vars['external_net_cidr'] = os.environ.get('TEST_CIDR_EXT')
|
||||
|
||||
|
||||
@@ -2078,8 +2078,8 @@ def get_ports_from_device_id(neutron_client, device_id):
|
||||
return ports
|
||||
|
||||
|
||||
@tenacity.retry(wait=tenacity.wait_exponential(multiplier=1, max=60),
|
||||
reraise=True, stop=tenacity.stop_after_attempt(10))
|
||||
@tenacity.retry(wait=tenacity.wait_exponential(multiplier=1, max=120),
|
||||
reraise=True, stop=tenacity.stop_after_attempt(12))
|
||||
def cloud_init_complete(nova_client, vm_id, bootstring):
|
||||
"""Wait for cloud init to complete on the given vm.
|
||||
|
||||
@@ -2098,7 +2098,9 @@ def cloud_init_complete(nova_client, vm_id, bootstring):
|
||||
instance = nova_client.servers.find(id=vm_id)
|
||||
console_log = instance.get_console_output()
|
||||
if bootstring not in console_log:
|
||||
raise exceptions.CloudInitIncomplete()
|
||||
raise exceptions.CloudInitIncomplete(
|
||||
"'{}' not found in console log: {}"
|
||||
.format(bootstring, console_log))
|
||||
|
||||
|
||||
@tenacity.retry(wait=tenacity.wait_exponential(multiplier=1, max=60),
|
||||
|
||||
Reference in New Issue
Block a user