summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2016-07-10 22:40:17 -0400
committerFeng Pan <fpan@redhat.com>2016-07-10 22:40:17 -0400
commite73182cbfa7f7b544fddfcbc0ea79644722d730e (patch)
tree5c4b0b8777fba071b980faa1653652d57c598449 /lib
parent1895dcd2fa7d6888b5e451b229b213954f923de5 (diff)
Move br-phy and ovs agent bring up after bridge ip assignment for dpdk
Change-Id: I37dd541d3ad413b76d94cbc89ab1b2c8e1a723f1 Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/post-install-functions.sh50
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh
index f52e28e1..75207ba2 100755
--- a/lib/post-install-functions.sh
+++ b/lib/post-install-functions.sh
@@ -29,6 +29,31 @@ cat ~/jumphost_id_rsa.pub | ssh -T ${SSH_OPTIONS[@]} "heat-admin@\$node" 'cat >>
done
EOI
+ echo -e "${blue}INFO: Checking if OVS bridges have IP addresses...${reset}"
+ for network in ${opnfv_attach_networks}; do
+ ovs_ip=$(find_ip ${NET_MAP[$network]})
+ tmp_ip=''
+ if [ -n "$ovs_ip" ]; then
+ echo -e "${blue}INFO: OVS Bridge ${NET_MAP[$network]} has IP address ${ovs_ip}${reset}"
+ else
+ echo -e "${blue}INFO: OVS Bridge ${NET_MAP[$network]} missing IP, will configure${reset}"
+ # use last IP of allocation pool
+ eval "ip_range=\${${network}_usable_ip_range}"
+ ovs_ip=${ip_range##*,}
+ eval "net_cidr=\${${network}_cidr}"
+ 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]})
+ if [ -n "$tmp_ip" ]; then
+ echo -e "${blue}INFO: OVS Bridge ${NET_MAP[$network]} IP set: ${tmp_ip}${reset}"
+ continue
+ else
+ echo -e "${red}ERROR: Unable to set OVS Bridge ${NET_MAP[$network]} with IP: ${ovs_ip}${reset}"
+ return 1
+ fi
+ fi
+ done
+
if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then
echo -e "${blue}INFO: Bringing up br-phy and ovs-agent for dpdk compute nodes...${reset}"
compute_nodes=$(undercloud_connect stack "source stackrc; nova list | grep compute | wc -l")
@@ -69,31 +94,6 @@ if [ "${deploy_options_array['congress']}" == 'True' ]; then
fi
EOI
- echo -e "${blue}INFO: Checking if OVS bridges have IP addresses...${reset}"
- for network in ${opnfv_attach_networks}; do
- ovs_ip=$(find_ip ${NET_MAP[$network]})
- tmp_ip=''
- if [ -n "$ovs_ip" ]; then
- echo -e "${blue}INFO: OVS Bridge ${NET_MAP[$network]} has IP address ${ovs_ip}${reset}"
- else
- echo -e "${blue}INFO: OVS Bridge ${NET_MAP[$network]} missing IP, will configure${reset}"
- # use last IP of allocation pool
- eval "ip_range=\${${network}_usable_ip_range}"
- ovs_ip=${ip_range##*,}
- eval "net_cidr=\${${network}_cidr}"
- 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]})
- if [ -n "$tmp_ip" ]; then
- echo -e "${blue}INFO: OVS Bridge ${NET_MAP[$network]} IP set: ${tmp_ip}${reset}"
- continue
- else
- echo -e "${red}ERROR: Unable to set OVS Bridge ${NET_MAP[$network]} with IP: ${ovs_ip}${reset}"
- return 1
- fi
- fi
- done
-
# for virtual, we NAT public network through Undercloud
if [ "$virtual" == "TRUE" ]; then
if ! configure_undercloud_nat ${public_network_cidr}; then