Fix SUBNETPOOL_V4_ID check in devstack

In the devstack script, `[ -n $SUBNETPOOL_V4_ID ]` returns true even if
SUBNETPOOL_V4_ID variable is not defined, which is not expected.
I can see the error as the following:

```
2019-02-06 07:20:57.095 | Finalizing Neutron networking for Trove
2019-02-06 07:20:57.095 | Dumping current network parameters:
...
2019-02-06 07:20:57.096 |   SUBNETPOOL_V4_ID:
...
2019-02-06 07:21:02.706 | openstack subnet create: error: argument --subnet-pool: expected one argument
```

This patch changes that to `[ -n "$SUBNETPOOL_V4_ID" ]`

Change-Id: Ib37b2ade3d7cf556340944a56944beb4bb47d7d9
This commit is contained in:
Lingxian Kong 2019-02-07 00:47:28 +13:00
parent 73e4419615
commit 795f2bde88
1 changed files with 1 additions and 1 deletions

View File

@ -409,7 +409,7 @@ function _create_private_subnet_v4 {
if [[ -n "$NETWORK_GATEWAY" ]]; then
subnet_params+="--gateway $NETWORK_GATEWAY "
fi
if [ -n $SUBNETPOOL_V4_ID ]; then
if [ -n "$SUBNETPOOL_V4_ID" ]; then
subnet_params+="--subnet-pool $SUBNETPOOL_V4_ID "
else
subnet_params+="--subnet-range $FIXED_RANGE "