diff --git a/manila/openstack/common/scheduler/filters/capabilities_filter.py b/manila/openstack/common/scheduler/filters/capabilities_filter.py index bdd0cd0736..fd99e718dd 100644 --- a/manila/openstack/common/scheduler/filters/capabilities_filter.py +++ b/manila/openstack/common/scheduler/filters/capabilities_filter.py @@ -47,8 +47,11 @@ class CapabilitiesFilter(filters.BaseHostFilter): try: cap = cap.get(scope[index]) except AttributeError: - return False + cap = None if cap is None: + LOG.debug("Host doesn't provide capability '%(cap)s' " + "listed in the extra specs", + {'cap': scope[index]}) return False if not extra_specs_ops.match(cap, req): LOG.debug("extra_spec requirement '%(req)s' " diff --git a/tools/install_venv.py b/tools/install_venv.py index 42b155fbce..452b8bd685 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -48,8 +48,8 @@ def print_help(venv, root): def main(argv): root = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) - if os.environ.get('tools_path'): - root = os.environ['tools_path'] + if os.environ.get('TOOLS_PATH'): + root = os.environ['TOOLS_PATH'] venv = os.path.join(root, '.venv') if os.environ.get('VENV'): venv = os.environ['VENV'] diff --git a/tools/with_venv.sh b/tools/with_venv.sh index 7303990bd8..165c883ab9 100755 --- a/tools/with_venv.sh +++ b/tools/with_venv.sh @@ -1,7 +1,6 @@ #!/bin/bash -TOOLS_PATH=${TOOLS_PATH:-$(dirname $0)} +TOOLS_PATH=${TOOLS_PATH:-$(dirname $0)/../} VENV_PATH=${VENV_PATH:-${TOOLS_PATH}} -VENV_DIR=${VENV_NAME:-/../.venv} -TOOLS=${TOOLS_PATH} +VENV_DIR=${VENV_DIR:-/.venv} VENV=${VENV:-${VENV_PATH}/${VENV_DIR}} source ${VENV}/bin/activate && "$@"