Don't treat service as enabled if in disabled list
The old implementation for is_$service_enabled simply checked if any of the subservices were enabled and if so the service was considered to be enabled. This makes disabling services complicated as it means you have to list every single subservice which can and do change over time. Instead also check if the generic service name is in the disabled services list and if so don't treat the service as enabled. Change-Id: I7fe4dfca2cd9c15069d50a04161a29c5638291cb
This commit is contained in:
parent
3742b14622
commit
902158bb8f
@ -129,6 +129,7 @@ CINDER_CACHE_ENABLED_FOR_BACKENDS=${CINDER_CACHE_ENABLED_FOR_BACKENDS:-$CINDER_E
|
||||
# Test if any Cinder services are enabled
|
||||
# is_cinder_enabled
|
||||
function is_cinder_enabled {
|
||||
[[ ,${DISABLED_SERVICES} =~ ,"cinder" ]] && return 1
|
||||
[[ ,${ENABLED_SERVICES} =~ ,"c-" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ GLANCE_REGISTRY_PORT_INT=${GLANCE_REGISTRY_PORT_INT:-19191}
|
||||
# Test if any Glance services are enabled
|
||||
# is_glance_enabled
|
||||
function is_glance_enabled {
|
||||
[[ ,${DISABLED_SERVICES} =~ ,"glance" ]] && return 1
|
||||
[[ ,${ENABLED_SERVICES} =~ ,"g-" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
@ -134,6 +134,7 @@ KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT=${KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT:-2}
|
||||
# Test if Keystone is enabled
|
||||
# is_keystone_enabled
|
||||
function is_keystone_enabled {
|
||||
[[ ,${DISABLED_SERVICES} =~ ,"keystone" ]] && return 1
|
||||
[[ ,${ENABLED_SERVICES}, =~ ,"key", ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
@ -91,6 +91,7 @@ declare -a -g _NEUTRON_SERVER_EXTRA_CONF_FILES_ABS
|
||||
# Test if any Neutron services are enabled
|
||||
# is_neutron_enabled
|
||||
function is_neutron_enabled {
|
||||
[[ ,${DISABLED_SERVICES} =~ ,"neutron" ]] && return 1
|
||||
[[ ,${ENABLED_SERVICES} =~ ,"neutron-" || ,${ENABLED_SERVICES} =~ ,"q-" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
@ -98,6 +99,7 @@ function is_neutron_enabled {
|
||||
# Test if any Neutron services are enabled
|
||||
# is_neutron_enabled
|
||||
function is_neutron_legacy_enabled {
|
||||
[[ ,${DISABLED_SERVICES} =~ ,"neutron" ]] && return 1
|
||||
[[ ,${ENABLED_SERVICES} =~ ,"q-" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
1
lib/nova
1
lib/nova
@ -175,6 +175,7 @@ NOVA_USE_SERVICE_TOKEN=$(trueorfalse False NOVA_USE_SERVICE_TOKEN)
|
||||
# Test if any Nova services are enabled
|
||||
# is_nova_enabled
|
||||
function is_nova_enabled {
|
||||
[[ ,${DISABLED_SERVICES} =~ ,"nova" ]] && return 1
|
||||
[[ ,${ENABLED_SERVICES} =~ ,"n-" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
@ -174,6 +174,7 @@ SWIFT_STORAGE_IPS=${SWIFT_STORAGE_IPS:-}
|
||||
# Test if any Swift services are enabled
|
||||
# is_swift_enabled
|
||||
function is_swift_enabled {
|
||||
[[ ,${DISABLED_SERVICES} =~ ,"swift" ]] && return 1
|
||||
[[ ,${ENABLED_SERVICES} =~ ,"s-" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ XXX_CONF_DIR=/etc/XXXX
|
||||
# Test if any XXXX services are enabled
|
||||
# is_XXXX_enabled
|
||||
function is_XXXX_enabled {
|
||||
[[ ,${DISABLED_SERVICES} =~ ,"XXXX" ]] && return 1
|
||||
[[ ,${ENABLED_SERVICES} =~ ,"XX-" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user