labs: set tunnel IP address
Replace placeholder INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS with the node's IP address in the data network. To that end, the patch adds a new function hostname_to_ip. Change-Id: I7baabdde50e62c9c8f006c19eddeca54d368666b Implements: blueprint openstack-training-labs
This commit is contained in:
@@ -303,6 +303,11 @@ function get_ip_from_net_and_fourth {
|
|||||||
echo "${NET%.*}.$FOURTH_OCTET"
|
echo "${NET%.*}.$FOURTH_OCTET"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hostname_to_ip {
|
||||||
|
local host_name=$1
|
||||||
|
getent hosts "$host_name"|awk '{print $1}'
|
||||||
|
}
|
||||||
|
|
||||||
function config_network {
|
function config_network {
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
# Configuration functions will append to this file
|
# Configuration functions will append to this file
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ iniset_sudo $conf securitygroup firewall_driver neutron.agent.linux.iptables_fir
|
|||||||
iniset_sudo $conf securitygroup enable_security_group True
|
iniset_sudo $conf securitygroup enable_security_group True
|
||||||
|
|
||||||
# Under the ovs section
|
# Under the ovs section
|
||||||
iniset_sudo $conf ovs local_ip INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS
|
iniset_sudo $conf ovs local_ip "$(hostname_to_ip compute-data)"
|
||||||
iniset_sudo $conf ovs tunnel_type gre
|
iniset_sudo $conf ovs tunnel_type gre
|
||||||
iniset_sudo $conf ovs enable_tunneling True
|
iniset_sudo $conf ovs enable_tunneling True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user