diff options
author | Zuul <zuul@review.opendev.org> | 2022-07-20 05:07:48 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-07-20 05:07:48 +0000 |
commit | 876de8ee5a407acf45e6df8fb029693de0bc3535 (patch) | |
tree | f8efd0878e6022d1a2b18cf5d5b49d7927255174 | |
parent | 13db5b37c30cb94ef9d389381ce03af5c8461f4b (diff) | |
parent | a8d9a82df18c78b5ab244761e2861f6d023d6887 (diff) | |
download | trove-876de8ee5a407acf45e6df8fb029693de0bc3535.tar.gz |
Merge "Add a check before executing ip replace"
-rw-r--r-- | devstack/plugin.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 01800907..2b34158e 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -538,7 +538,9 @@ function config_trove_network { if [[ "$shared" == "False" ]]; then openstack network set ${PRIVATE_NETWORK_NAME} --share fi - sudo ip route replace ${IPV4_ADDRS_SAFE_TO_USE} via $ROUTER_GW_IP + if [[ -n ${ROUTER_GW_IP} && -n ${IPV4_ADDRS_SAFE_TO_USE} ]]; then + sudo ip route replace ${IPV4_ADDRS_SAFE_TO_USE} via $ROUTER_GW_IP + fi # Make sure we can reach the management port of the service VM, this # configuration is only for testing purpose. In production, it's |