Currently, devstack can't deploy OpenStack with flat provider network.
devstack checks whether SEGMENTATION_ID is provided or not when it
deploys openstack with provider network. If it is not provided devstack
prints a error message and dies.
On the other hand, devstack also gets an error from "neutron net-create"
command even if it sets SEGMENTATION_ID with flat option.
In addition to that, because neutron allows partial specs these days,
SEGMENTATION_ID checking should be removed completely.
Also, devstack uses PHYSICAL_NETWORK both as "network name" and "physical
network name" in neutron command. If it is not provided, the command fails
to create network. So devstack should check whether PHYSICAL_NETWORK is
provided.
See also:
https://blueprints.launchpad.net/neutron/+spec/provider-network-partial-specs
Change-Id: I2273e3369c688bbce1a6e39b43635b5548cc2b98
Closes-Bug: #1362382
| ... | ... |
@@ -492,9 +492,9 @@ function create_neutron_initial_network {
|
| 492 | 492 |
sudo ifconfig $OVS_PHYSICAL_BRIDGE up |
| 493 | 493 |
sudo route add default gw $NETWORK_GATEWAY dev $OVS_PHYSICAL_BRIDGE |
| 494 | 494 |
elif is_provider_network; then |
| 495 |
- die_if_not_set $LINENO SEGMENTATION_ID "A SEGMENTATION_ID is required to use provider networking" |
|
| 495 |
+ die_if_not_set $LINENO PHYSICAL_NETWORK "You must specify the PHYSICAL_NETWORK" |
|
| 496 | 496 |
die_if_not_set $LINENO PROVIDER_NETWORK_TYPE "You must specifiy the PROVIDER_NETWORK_TYPE" |
| 497 |
- NET_ID=$(neutron net-create $PHYSICAL_NETWORK --tenant_id $TENANT_ID --provider:network_type $PROVIDER_NETWORK_TYPE --provider:physical_network "$PHYSICAL_NETWORK" --provider:segmentation_id "$SEGMENTATION_ID" --shared | grep ' id ' | get_field 2) |
|
| 497 |
+ NET_ID=$(neutron net-create $PHYSICAL_NETWORK --tenant_id $TENANT_ID --provider:network_type $PROVIDER_NETWORK_TYPE --provider:physical_network "$PHYSICAL_NETWORK" ${SEGMENTATION_ID:+--provider:segmentation_id $SEGMENTATION_ID} --shared | grep ' id ' | get_field 2)
|
|
| 498 | 498 |
SUBNET_ID=$(neutron subnet-create --tenant_id $TENANT_ID --ip_version 4 ${ALLOCATION_POOL:+--allocation-pool $ALLOCATION_POOL} --name $PROVIDER_SUBNET_NAME $NET_ID $FIXED_RANGE | grep ' id ' | get_field 2)
|
| 499 | 499 |
SUBNET_V6_ID=$(neutron subnet-create --tenant_id $TENANT_ID --ip_version 6 --ipv6-address-mode slaac --gateway $V6_NETWORK_GATEWAY --name $PROVIDER_SUBNET_NAME_V6 $NET_ID $FIXED_RANGE_V6 | grep 'id' | get_field 2) |
| 500 | 500 |
sudo ip link set $OVS_PHYSICAL_BRIDGE up |