From 1070ba728e1b07f1629e3bddd01a2f239305108f Mon Sep 17 00:00:00 2001 From: Clinton Knight Date: Tue, 17 Nov 2015 17:05:36 -0800 Subject: [PATCH] Last sync to Manila from oslo-incubator Oslo incubator is going away, and we cannot use the sync script to copy the incubator files to Manila one last time because at least one file has changed in Manila since the last sync. This commit includes the remaining changes which we do want. The files are consistent with the oslo-incubator master branch as of commit 305c2b0d52d387c0039e3b3021c4de27e85cd175. Change-Id: Ib880a0108e4a567ebe39aa1ada7f872c63a818f1 --- .../common/scheduler/filters/capabilities_filter.py | 5 ++++- tools/install_venv.py | 4 ++-- tools/with_venv.sh | 5 ++--- 3 files changed, 8 insertions(+), 6 deletions(-) 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 && "$@"