Skip to content
Snippets Groups Projects
Commit 4fde486d authored by Paul Bourke's avatar Paul Bourke
Browse files

Only start one glance_api when using file backend

The default backend storage for Glance in Kolla is file, as this is the
easiest to deploy. However, this leads to frustration in a multinode
scenario as the volumes aren't shared.

This change sets glance_api to only start on one control node when using
the file backend.

DocImpact
Closes-Bug: #1681301
Change-Id: I2c167bae6f34a102cd7fe66401d7defe13bf2bf7
parent f70dfc5d
No related branches found
No related tags found
No related merge requests found
...@@ -69,6 +69,8 @@ glance_backends: ...@@ -69,6 +69,8 @@ glance_backends:
glance_store_backends: "{{ glance_backends|selectattr('enabled', 'equalto', true)|list }}" glance_store_backends: "{{ glance_backends|selectattr('enabled', 'equalto', true)|list }}"
glance_api_hosts: "{{ groups['glance-api']|first if glance_backend_file | bool and glance_file_datadir_volume == 'glance' else groups['glance-api'] }}"
#################### ####################
# OpenStack # OpenStack
#################### ####################
......
...@@ -15,14 +15,13 @@ ...@@ -15,14 +15,13 @@
volumes: "{{ service.volumes }}" volumes: "{{ service.volumes }}"
when: when:
- action != "config" - action != "config"
- inventory_hostname in groups[service.group] - inventory_hostname in glance_api_hosts
- service.enabled | bool - service.enabled | bool
- config_json.changed | bool - config_json.changed | bool
or glance_conf.changed | bool or glance_conf.changed | bool
or policy_json.changed | bool or policy_json.changed | bool
or glance_api_container.changed | bool or glance_api_container.changed | bool
- name: Restart glance-registry container - name: Restart glance-registry container
vars: vars:
service_name: "glance-registry" service_name: "glance-registry"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment