From 795f2bde884bb0b6a409e4c5b15f2633a3ced7b2 Mon Sep 17 00:00:00 2001 From: Lingxian Kong Date: Thu, 7 Feb 2019 00:47:28 +1300 Subject: [PATCH] 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 --- devstack/plugin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 25e738d6bf..c9d42e7686 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 "