diff options
author | Lingxian Kong <anlin.kong@gmail.com> | 2019-02-07 00:47:28 +1300 |
---|---|---|
committer | Lingxian Kong <anlin.kong@gmail.com> | 2019-02-13 23:13:48 +1300 |
commit | 795f2bde884bb0b6a409e4c5b15f2633a3ced7b2 (patch) | |
tree | bfc9b723949b152b8312641a04ff6807e04860c5 /devstack | |
parent | 73e4419615d87e70049a2261f5c24a982986c53d (diff) | |
download | trove-795f2bde884bb0b6a409e4c5b15f2633a3ced7b2.tar.gz |
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
Diffstat (limited to 'devstack')
-rw-r--r-- | devstack/plugin.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 25e738d6..c9d42e76 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -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 " |