Configure hostname to be FQDN instead of localhost

hostname is set to localhost. It should be set
to reflect the actual hostname and not localhost.

Change-Id: If41ab16a43f98d2c0112a82f811b2137ea5515b2
This commit is contained in:
Janki Chhatbar 2018-05-23 15:00:39 +05:30
parent b5afa4f851
commit 0fd755588a
3 changed files with 14 additions and 0 deletions

View File

@ -233,6 +233,11 @@ class neutron::plugins::ovs::opendaylight (
value => $host_id,
}
# Set hostname to FQDN instead of default 'localhost'
vs_config {'external_ids:hostname':
value => $host_id,
}
$json_network_types = convert_to_json_string($allowed_network_types)
$json_bridge_mappings = convert_to_json_string($provider_mappings)

View File

@ -0,0 +1,4 @@
---
features:
- |
Set hostname to FQDN in OVS when deployed with OpenDaylight.

View File

@ -136,6 +136,7 @@ describe 'neutron::plugins::ovs::opendaylight' do
is_expected.to contain_vs_config('other_config:local_ip')
is_expected.not_to contain_vs_config('other_config:provider_mappings')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_hostid')
is_expected.to contain_vs_config('external_ids:hostname')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_config_odl_l2')
end
end
@ -147,6 +148,7 @@ describe 'neutron::plugins::ovs::opendaylight' do
is_expected.to contain_vs_config('other_config:local_ip')
is_expected.to contain_vs_config('other_config:provider_mappings')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_hostid')
is_expected.to contain_vs_config('external_ids:hostname')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_config_odl_l2').with(
:value => /bridge_mappings\": {\"default\":\"br-ex\"}/
)
@ -160,6 +162,7 @@ describe 'neutron::plugins::ovs::opendaylight' do
is_expected.to contain_vs_config('other_config:local_ip')
is_expected.not_to contain_vs_config('other_config:provider_mappings')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_hostid')
is_expected.to contain_vs_config('external_ids:hostname')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_config_odl_l2').with(
:value => /vhostuser/,
)
@ -175,6 +178,7 @@ describe 'neutron::plugins::ovs::opendaylight' do
is_expected.to contain_vs_config('other_config:local_ip')
is_expected.not_to contain_vs_config('other_config:provider_mappings')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_hostid')
is_expected.to contain_vs_config('external_ids:hostname')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_config_odl_l2')
end
end
@ -189,6 +193,7 @@ describe 'neutron::plugins::ovs::opendaylight' do
is_expected.to contain_vs_config('other_config:local_ip')
is_expected.not_to contain_vs_config('other_config:provider_mappings')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_hostid')
is_expected.to contain_vs_config('external_ids:hostname')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_config_odl_l2')
end
end