Skip to content

Commit 9839f32

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add a more accurate expression for obtaining (IPV6_)ROUTER_GW_IP"
2 parents f3913f7 + c00df20 commit 9839f32

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/neutron-legacy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ function _neutron_configure_router_v4 {
13371337
sudo ip addr add $ext_gw_ip/$cidr_len dev $ext_gw_interface
13381338
sudo ip link set $ext_gw_interface up
13391339
fi
1340-
ROUTER_GW_IP=`neutron port-list -c fixed_ips -c device_owner | grep router_gateway | awk -F '"' -v subnet_id=$PUB_SUBNET_ID '$4 == subnet_id { print $8; }'`
1340+
ROUTER_GW_IP=`neutron port-list -c fixed_ips -c device_owner | grep router_gateway | awk -F'ip_address' '{ print $2 }' | cut -f3 -d\" | tr '\n' ' '`
13411341
die_if_not_set $LINENO ROUTER_GW_IP "Failure retrieving ROUTER_GW_IP"
13421342
sudo ip route replace $FIXED_RANGE via $ROUTER_GW_IP
13431343
fi
@@ -1368,7 +1368,7 @@ function _neutron_configure_router_v6 {
13681368
sudo sysctl -w net.ipv6.conf.all.forwarding=1
13691369
# Configure and enable public bridge
13701370
# Override global IPV6_ROUTER_GW_IP with the true value from neutron
1371-
IPV6_ROUTER_GW_IP=`neutron port-list -c fixed_ips | grep $ipv6_pub_subnet_id | awk -F '"' -v subnet_id=$ipv6_pub_subnet_id '$4 == subnet_id { print $8; }'`
1371+
IPV6_ROUTER_GW_IP=`neutron port-list -c fixed_ips | grep $ipv6_pub_subnet_id | awk -F'ip_address' '{ print $2 }' | cut -f3 -d\" | tr '\n' ' '`
13721372
die_if_not_set $LINENO IPV6_ROUTER_GW_IP "Failure retrieving IPV6_ROUTER_GW_IP"
13731373

13741374
if is_neutron_ovs_base_plugin; then

0 commit comments

Comments
 (0)