kolla-ansible/ansible/roles/glance/templates/glance-api.conf.j2
goldyfruit c20cf01872 filesystem_store_datadir should not be set when external Ceph is used
When an external Ceph cluster is used, the "filesystem_store_datadir"
option is set in the "glance-api.conf" configuration file.

It should not, it's because of this condition:

  {% elif enable_ceph | bool and glance_backend_ceph | bool %}

When external Ceph cluster is used "enable_ceph" is false and
"glance_backend_ceph" is true.

glance_backend_ceph variable should be enought for this condition.

Change-Id: I2a2ab420727888cfd9fcbc4bd30a08410163b36e
Closes-Bug: #1718728
2017-09-21 12:40:23 -04:00

100 lines
3.3 KiB
Django/Jinja

[DEFAULT]
debug = {{ glance_logging_debug }}
# NOTE(elemoine) log_dir alone does not work for Glance
log_file = /var/log/kolla/glance/glance-api.log
use_forwarded_for = true
bind_host = {{ api_interface_address }}
bind_port = {{ glance_api_port }}
workers = {{ openstack_service_workers }}
registry_host = {{ kolla_internal_fqdn }}
{% if enable_ceph | bool %}
show_image_direct_url= True
{% endif %}
cinder_catalog_info = volume:cinder:internalURL
transport_url = rabbit://{% for host in groups['rabbitmq'] %}{{ rabbitmq_user }}:{{ rabbitmq_password }}@{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ rabbitmq_port }}{% if not loop.last %},{% endif %}{% endfor %}
[database]
connection = mysql+pymysql://{{ glance_database_user }}:{{ glance_database_password }}@{{ glance_database_address }}/{{ glance_database_name }}
max_retries = -1
[keystone_authtoken]
auth_uri = {{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_public_port }}
auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
auth_type = password
project_domain_id = {{ default_project_domain_id }}
user_domain_id = {{ default_user_domain_id }}
project_name = service
username = {{ glance_keystone_user }}
password = {{ glance_keystone_password }}
memcache_security_strategy = ENCRYPT
memcache_secret_key = {{ memcache_secret_key }}
memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
[paste_deploy]
flavor = keystone
[glance_store]
{% if glance_backend_vmware | bool %}
default_store = vsphere
{% elif glance_backend_ceph | bool %}
default_store = rbd
{% elif enable_swift | bool and glance_backend_swift | bool %}
default_store = swift+http
{% else %}
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
{% endif %}
{% if glance_store_backends %}
stores = {{ glance_store_backends|map(attribute='name')|join(',') }}
{% endif %}
{% if enable_ceph | bool and glance_backend_ceph | bool %}
rbd_store_user = glance
rbd_store_pool = {{ ceph_glance_pool_name }}
rbd_store_chunk_size = 8
{% endif %}
{% if enable_swift | bool and glance_backend_swift | bool %}
swift_store_container = glance
swift_store_multiple_containers_seed = 0
swift_store_multi_tenant = False
swift_store_create_container_on_put = True
swift_store_region = {{ openstack_region_name }}
default_swift_reference = swift
swift_store_config_file = /etc/glance/glance-swift.conf
swift_store_auth_insecure = True
{% endif %}
{% if glance_backend_vmware | bool %}
vmware_server_host = {{ vmware_vcenter_host_ip }}
vmware_server_username = {{ vmware_vcenter_host_username }}
vmware_server_password = {{ vmware_vcenter_host_password }}
vmware_datastores = {{ vmware_vcenter_name }}:{{ vmware_datastore_name }}
vmware_insecure = True
{% endif %}
[oslo_messaging_notifications]
{% if enable_ceilometer | bool or enable_searchlight | bool %}
driver = messagingv2
{% else %}
driver = noop
{% endif %}
{% if enable_osprofiler | bool %}
[profiler]
enabled = true
trace_sqlalchemy = true
hmac_keys = {{ osprofiler_secret }}
{% if enable_elasticsearch | bool %}
connection_string = elasticsearch://{{ elasticsearch_address }}:{{ elasticsearch_port }}
{% endif %}
{% endif %}