Allow externally managed swift as glance backend

It is possible to have an accessible swift API that is not managed by
kolla-ansible -- for example, ceph exposes a swift API, and using that
requires setting swift as the glance backend.

So, we should loosen the requirement that using the swift backend for
glance requires swift be enabled in kolla-ansible.

Co-Authored-By: Adam Harwell <flux.adam@gmail.com>

Change-Id: I17076d5412d2b1e1f13bb0badceaca85a5cee108
This commit is contained in:
Joshua Harlow 2018-04-05 17:40:35 -07:00 committed by Adam Harwell
parent 003a6a12b1
commit 07dfc20292
3 changed files with 10 additions and 3 deletions

View File

@ -93,7 +93,7 @@ glance_backends:
- name: cinder
enabled: "{{ enable_cinder | bool }}"
- name: "swift"
enabled: "{{ enable_swift | bool and glance_backend_swift | bool }}"
enabled: "{{ glance_backend_swift | bool }}"
glance_store_backends: "{{ glance_backends|selectattr('enabled', 'equalto', true)|list }}"

View File

@ -45,7 +45,7 @@ flavor = keystone
default_store = vsphere
{% elif glance_backend_ceph | bool %}
default_store = rbd
{% elif enable_swift | bool and glance_backend_swift | bool %}
{% elif glance_backend_swift | bool %}
default_store = swift+http
{% else %}
default_store = file
@ -62,7 +62,7 @@ rbd_store_pool = {{ ceph_glance_pool_name }}
rbd_store_chunk_size = 8
{% endif %}
{% if enable_swift | bool and glance_backend_swift | bool %}
{% if glance_backend_swift | bool %}
swift_store_container = glance
swift_store_multiple_containers_seed = 0
swift_store_multi_tenant = False

View File

@ -0,0 +1,7 @@
---
features:
- |
Allow overriding the variable `glance_backend_swift` to enable the swift
backend for glance, without requiring swift to be enabled in kolla-ansible.
This allows operators to enable an external swift endpoint as the glance
backend.