Merge "Add SNAP support when finding Docker images folder"

This commit is contained in:
Jenkins 2017-03-03 15:04:25 +00:00 committed by Gerrit Code Review
commit 6a636204e7

View File

@ -573,7 +573,12 @@ class KollaWorker(object):
possible_paths = (
PROJECT_ROOT,
os.path.join(sys.prefix, 'share/kolla'),
os.path.join(sys.prefix, 'local/share/kolla'))
os.path.join(sys.prefix, 'local/share/kolla'),
# NOTE(zioproto): When Kolla is used within a snap, the env var
# $SNAP is the directory where the snap is mounted.
# https://github.com/openstack/snap-kolla
# More info in snap packages https://snapcraft.io
os.path.join(os.environ.get('SNAP', ''), 'share/kolla'))
for path in possible_paths:
image_path = os.path.join(path, 'docker')