From 7b3ae5332813c79b734c99fbba3ab876224aa73c Mon Sep 17 00:00:00 2001 From: John Kasperski Date: Sun, 24 Apr 2016 22:56:04 -0500 Subject: [PATCH] Update is_service_enabled The nova check in is_service_enabled() is loading the nova repo when ENABLED_SERVICES=ovn-northd. Add a comma before each of the checks to prevent this error with any of the other services. Change-Id: I9deee735812cde44ea5140b1ad76848f02576609 Closes-Bug: #1574431 --- functions-common | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/functions-common b/functions-common index e44fea112d..a56a0abe9c 100644 --- a/functions-common +++ b/functions-common @@ -2063,14 +2063,14 @@ function is_service_enabled { # TODO(dtroyer): Remove these legacy special-cases after the is_XXX_enabled() # are implemented - [[ ${service} == n-cell-* && ${ENABLED_SERVICES} =~ "n-cell" ]] && enabled=0 - [[ ${service} == n-cpu-* && ${ENABLED_SERVICES} =~ "n-cpu" ]] && enabled=0 - [[ ${service} == "nova" && ${ENABLED_SERVICES} =~ "n-" ]] && enabled=0 - [[ ${service} == "glance" && ${ENABLED_SERVICES} =~ "g-" ]] && enabled=0 - [[ ${service} == "neutron" && ${ENABLED_SERVICES} =~ "q-" ]] && enabled=0 - [[ ${service} == "trove" && ${ENABLED_SERVICES} =~ "tr-" ]] && enabled=0 - [[ ${service} == "swift" && ${ENABLED_SERVICES} =~ "s-" ]] && enabled=0 - [[ ${service} == s-* && ${ENABLED_SERVICES} =~ "swift" ]] && enabled=0 + [[ ${service} == n-cell-* && ,${ENABLED_SERVICES} =~ ,"n-cell" ]] && enabled=0 + [[ ${service} == n-cpu-* && ,${ENABLED_SERVICES} =~ ,"n-cpu" ]] && enabled=0 + [[ ${service} == "nova" && ,${ENABLED_SERVICES} =~ ,"n-" ]] && enabled=0 + [[ ${service} == "glance" && ,${ENABLED_SERVICES} =~ ,"g-" ]] && enabled=0 + [[ ${service} == "neutron" && ,${ENABLED_SERVICES} =~ ,"q-" ]] && enabled=0 + [[ ${service} == "trove" && ,${ENABLED_SERVICES} =~ ,"tr-" ]] && enabled=0 + [[ ${service} == "swift" && ,${ENABLED_SERVICES} =~ ,"s-" ]] && enabled=0 + [[ ${service} == s-* && ,${ENABLED_SERVICES} =~ ,"swift" ]] && enabled=0 done $xtrace