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

Fix issues in Glance filesystem backend

The drop root change for Glance highlighted the fact that we were
binding volumes from glance_data into the wrong container - it was
glance_registry whereas it should be glance_api. This would result in
all images being lost if the glance_api container happens to restart.

Also, we need a sudoers file to chown the file backend dir to the glance
user.

Change-Id: If04337045bb94b3126e48d1f5bf0ea29e20373ae
Closes-Bug: #1516729
parent ac0442a8
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,6 @@
volumes:
- "{{ node_config_directory }}/glance-registry/:{{ container_config_directory }}/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
volumes_from:
- glance_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['glance-registry']
......@@ -39,6 +37,8 @@
volumes:
- "{{ node_config_directory }}/glance-api/:{{ container_config_directory }}/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
volumes_from:
- glance_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['glance-api']
......@@ -4,5 +4,6 @@
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
glance-manage db_sync
sudo chown -R glance: /var/lib/glance/
exit 0
fi
......@@ -44,4 +44,8 @@ RUN ln -s glance-base-source/* glance \
{% endif %}
RUN usermod -a -G kolla glance
COPY glance_sudoers /etc/sudoers.d/glance_sudoers
RUN usermod -a -G kolla glance \
&& chmod 750 /etc/sudoers.d \
&& chmod 440 /etc/sudoers.d/glance_sudoers
%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R glance\: /var/lib/glance/, /bin/chown -R glance\: /var/lib/glance/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment