summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild/overcloud-full.sh1
-rw-r--r--ci/PR_revision.log1
-rw-r--r--config/network/network_settings_v6.yaml18
-rw-r--r--lib/common-functions.sh23
-rwxr-xr-xlib/post-install-functions.sh24
-rw-r--r--lib/python/apex/network_settings.py4
6 files changed, 63 insertions, 8 deletions
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index dd87247c..6a72705a 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -139,6 +139,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--install /root/openstack-tacker-2015.2-1.noarch.rpm \
--upload puppet-tacker.tar.gz:/etc/puppet/modules/ \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-tacker.tar.gz" \
+ --run-command "yum install -y https://dl.dropboxusercontent.com/u/7079970/rabbitmq-server-3.6.3-5.el7ost.noarch.rpm" \
-a overcloud-full_build.qcow2
mv -f overcloud-full_build.qcow2 overcloud-full.qcow2
diff --git a/ci/PR_revision.log b/ci/PR_revision.log
index 10daeaee..fa978dfe 100644
--- a/ci/PR_revision.log
+++ b/ci/PR_revision.log
@@ -18,3 +18,4 @@
44,Fixes nova host/ip bug
43,Add support for live migration and resize
41,Add pcs cleanup exec
+50,Fix rabbitmq ipv6 config \ No newline at end of file
diff --git a/config/network/network_settings_v6.yaml b/config/network/network_settings_v6.yaml
index 8ca5eaca..dd2d066e 100644
--- a/config/network/network_settings_v6.yaml
+++ b/config/network/network_settings_v6.yaml
@@ -30,12 +30,15 @@ dns_servers: ["8.8.8.8", "8.8.4.4"]
# network is used as the OpenStack management network which
# carries e.g. communication between its internal components.
# This network must be IPv4 currently.
+domain_name: 'opnfvapex.com'
admin_network:
enabled: true
network_type: bridged
bridged_interface: ''
bond_interfaces: ''
+ compute_interface: nic1
+ controller_interface: nic1
vlan: native
usable_ip_range: 192.0.2.11,192.0.2.99
gateway: 192.0.2.1
@@ -53,6 +56,11 @@ admin_network:
private_network:
enabled: true
cidr: 11.0.0.0/24
+ vlan: native
+ cidr: 11.0.0.0/24
+ compute_interface: nic2
+ controller_interface: nic2
+
# "public" network is used for external connectivity.
# The external network provides Internet access for virtual
@@ -65,6 +73,9 @@ public_network:
enabled: true
network_type: ''
bridged_interface: ''
+ compute_interface: nic3
+ controller_interface: nic3
+ vlan: native
cidr: 2001:db8::/64
gateway: 2001:db8::1
provisioner_ip: 2001:db8::1
@@ -76,11 +87,18 @@ public_network:
storage_network:
enabled: true
cidr: fd00:fd00:fd00:2000::/64
+ vlan: native
+ compute_interface: nic4
+ controller_interface: nic4
+
# "api" is an optional network used by internal openstack api services.
api_network:
enabled: true
cidr: fd00:fd00:fd00:4000::/64
+ vlan: native
+ compute_interface: nic5
+ controller_interface: nic5
#public_network:
# enabled: true #If disabled, public_network traffic will collapse to admin network
diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index 2ace9970..6941093c 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -21,13 +21,19 @@ function prefix2mask {
}
##find ip of interface
-##params: interface name
+##params: interface name, address family
function find_ip {
+ local af
if [[ -z "$1" ]]; then
return 1
fi
+ if [[ -z "$2" ]]; then
+ af=4
+ else
+ af=$2
+ fi
- python3.4 -B $LIB/python/apex_python_utils.py find-ip -i $1
+ python3.4 -B $LIB/python/apex_python_utils.py find-ip -i $1 -af $af
}
##attach interface to OVS and set the network config correctly
@@ -287,3 +293,16 @@ function verify_internet {
return 1
fi
}
+
+##tests if overcloud nodes have external connectivity
+#params:none
+function test_overcloud_connectivity {
+ for node in $(undercloud_connect stack ". stackrc && nova list" | grep -Eo "controller-[0-9]+|compute-[0-9]+" | tr -d -) ; do
+ if ! overcloud_connect $node "ping -c 2 $ping_site > /dev/null"; then
+ echo "${blue}Node ${node} was unable to ping site ${ping_site}${reset}"
+ return 1
+ fi
+ done
+ echo "${blue}Overcloud external connectivity OK${reset}"
+}
+
diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh
index 1d18b95d..a7499feb 100755
--- a/lib/post-install-functions.sh
+++ b/lib/post-install-functions.sh
@@ -11,7 +11,8 @@
##Post configuration after install
##params: none
function configure_post_install {
- local opnfv_attach_networks ovs_ip ip_range net_cidr tmp_ip
+ local opnfv_attach_networks ovs_ip ip_range net_cidr tmp_ip af public_network_ipv6
+ public_network_ipv6=False
opnfv_attach_networks="admin_network public_network"
echo -e "${blue}INFO: Post Install Configuration Running...${reset}"
@@ -41,9 +42,19 @@ EOI
eval "ip_range=\${${network}_usable_ip_range}"
ovs_ip=${ip_range##*,}
eval "net_cidr=\${${network}_cidr}"
+ if [[ $ovs_ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ af=4
+ else
+ af=6
+ if [ "$network" == "public_network" ]; then
+ public_network_ipv6=True
+ fi
+ #enable ipv6 on bridge interface
+ echo 0 > /proc/sys/net/ipv6/conf/${NET_MAP[$network]}/disable_ipv6
+ fi
sudo ip addr add ${ovs_ip}/${net_cidr##*/} dev ${NET_MAP[$network]}
sudo ip link set up ${NET_MAP[$network]}
- tmp_ip=$(find_ip ${NET_MAP[$network]})
+ tmp_ip=$(find_ip ${NET_MAP[$network]} $af)
if [ -n "$tmp_ip" ]; then
echo -e "${blue}INFO: OVS Bridge ${NET_MAP[$network]} IP set: ${tmp_ip}${reset}"
continue
@@ -81,7 +92,11 @@ if [[ -n "$public_network_vlan" && "$public_network_vlan" != 'native' ]]; then
else
neutron net-create external --router:external=True --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }')
fi
-neutron subnet-create --name external-net --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') --disable-dhcp external --gateway ${public_network_gateway} --allocation-pool start=${public_network_floating_ip_range%%,*},end=${public_network_floating_ip_range##*,} ${public_network_cidr}
+if [ "$public_network_ipv6" == "True" ]; then
+ neutron subnet-create --name external-net --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') external --ip_version 6 --ipv6_ra_mode slaac --ipv6_address_mode slaac --gateway ${public_network_gateway} --allocation-pool start=${public_network_floating_ip_range%%,*},end=${public_network_floating_ip_range##*,} ${public_network_cidr}
+else
+ neutron subnet-create --name external-net --tenant-id \$(openstack project show service | grep id | awk '{ print \$4 }') --disable-dhcp external --gateway ${public_network_gateway} --allocation-pool start=${public_network_floating_ip_range%%,*},end=${public_network_floating_ip_range##*,} ${public_network_cidr}
+fi
echo "Removing sahara endpoint and service"
sahara_service_id=\$(openstack service list | grep sahara | cut -d ' ' -f 2)
@@ -108,7 +123,8 @@ fi
EOI
# for virtual, we NAT public network through Undercloud
- if [ "$virtual" == "TRUE" ]; then
+ # same goes for baremetal if only jumphost has external connectivity
+ if [ "$virtual" == "TRUE" ] || ! test_overcloud_connectivity && [ "$public_network_ipv6" != "True" ]; then
if ! configure_undercloud_nat ${public_network_cidr}; then
echo -e "${red}ERROR: Unable to NAT undercloud with external net: ${public_network_cidr}${reset}"
exit 1
diff --git a/lib/python/apex/network_settings.py b/lib/python/apex/network_settings.py
index f2807664..c81256eb 100644
--- a/lib/python/apex/network_settings.py
+++ b/lib/python/apex/network_settings.py
@@ -223,7 +223,7 @@ class NetworkSettings:
- introspection_range
- public_network:
- provisioner_ip
- - floating_ip
+ - floating_ip_range
- gateway
"""
if network == constants.ADMIN_NETWORK:
@@ -236,7 +236,7 @@ class NetworkSettings:
elif network == constants.PUBLIC_NETWORK:
self._config_ip(network, 'provisioner_ip', 1)
self._config_ip_range(network=network,
- setting='floating_ip',
+ setting='floating_ip_range',
end_offset=2, count=20)
self._config_gateway(network)