Browse code

Create private IPv6 subnet specifying mode flags

$ipv6_modes should always be passed when creating the
default IPv6 subnet, not just when fixed_range_v6 is
set. Without it the default was DHCPv6, which cirros
doesn't support out of the box. Was broken in
change-over from neutron to openstack cli.

Change-Id: Iadd39b1ce02fe0b3781bd3ae04adfd20d7e12d9f
Closes-bug: #1656098

Brian Haley authored on 2017/01/13 06:11:11
Showing 1 changed files
... ...
@@ -292,8 +292,8 @@ function _neutron_create_private_subnet_v6 {
292 292
         subnet_params+="--gateway $IPV6_PRIVATE_NETWORK_GATEWAY "
293 293
     fi
294 294
     subnet_params+="${SUBNETPOOL_V6_ID:+--subnet-pool $SUBNETPOOL_V6_ID} "
295
-    subnet_params+="${fixed_range_v6:+--subnet-range $fixed_range_v6 $ipv6_modes} "
296
-    subnet_params+="--network $NET_ID $IPV6_PRIVATE_SUBNET_NAME "
295
+    subnet_params+="${fixed_range_v6:+--subnet-range $fixed_range_v6} "
296
+    subnet_params+="$ipv6_modes --network $NET_ID $IPV6_PRIVATE_SUBNET_NAME "
297 297
     local ipv6_subnet_id
298 298
     ipv6_subnet_id=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create $subnet_params | grep ' id ' | get_field 2)
299 299
     die_if_not_set $LINENO ipv6_subnet_id "Failure creating private IPv6 subnet for $project_id"