Browse code

Accept IPv6 RAs on the interface with the default route

Because neutron sets ipv6 forwarding settings, we stop accepting RAs
from IPv6-only host environments. This leads to a loss of external
connectivity, which is bad for zuul running tests and stuff.

Setting accept_ra to 2 will cause the RAs to be accepted.

(cherry picked from commit 85b1308be4f4107a9054037b1d7351f57f473a1f)

Conflicts:
lib/neutron_plugins/services/l3

Closes-bug: #1616282

Change-Id: Ia044fff2a1731ab6c04f82aea47096b425e0c0a0

Monty Taylor authored on 2016/08/24 09:07:57
Showing 1 changed files
... ...
@@ -362,6 +362,9 @@ else
362 362
     Q_USE_SECGROUP=False
363 363
 fi
364 364
 
365
+default_route_dev=$(ip route | grep ^default | awk '{print $5}')
366
+die_if_not_set $LINENO default_route_dev "Failure retrieving default route device"
367
+
365 368
 # Save trace setting
366 369
 _XTRACE_NEUTRON=$(set +o | grep xtrace)
367 370
 set +o xtrace
... ...
@@ -1345,6 +1348,11 @@ function _neutron_configure_router_v6 {
1345 1345
 
1346 1346
     # This logic is specific to using the l3-agent for layer 3
1347 1347
     if is_service_enabled q-l3; then
1348
+        # Ensure IPv6 RAs are accepted on the interface with the default route.
1349
+        # This is needed for neutron-based devstack clouds to work in
1350
+        # IPv6-only clouds in the gate. Please do not remove this without
1351
+        # talking to folks in Infra.
1352
+        sudo sysctl -w net.ipv6.conf.$default_route_dev.accept_ra=2
1348 1353
         # Ensure IPv6 forwarding is enabled on the host
1349 1354
         sudo sysctl -w net.ipv6.conf.all.forwarding=1
1350 1355
         # Configure and enable public bridge