Turn the filesystem directory to be configurable

Update the ownership of the directory about NFS mount point(s).

This patch could be also stand as an improvement for future use.

Making the filesystem directory configurable, we are able to store
the image in the different directory (or in a new path) under
glance_system_user_home repo, which is able to be configured
dynamically, for instance, via deployment of a scenario.

Change-Id: I7403ac9bd85ea3ed149e13cb57c51039602f6ba1
Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
This commit is contained in:
Panagiotis Karalis 2018-10-29 15:13:54 +02:00 committed by Dmitriy Rabotyagov
parent ae681ded4e
commit c27d0123ab
3 changed files with 5 additions and 3 deletions

View File

@ -207,7 +207,7 @@ glance_policy_dirs: policy.d
# Define nfs information to enable nfs shares as mounted directories for
# glance. The ``glance_nfs_client`` value is a list of dictionaries that must
# be filled out completely to enable the persistent NFS mounts.
glance_nfs_local_directory: "images"
glance_nfs_client: []
# Example of the expected dict structure:

View File

@ -50,6 +50,8 @@
owner: "{{ glance_system_user_name }}"
group: "{{ glance_system_group_name }}"
mode: "0755"
owner: "{{ item.owner | default(glance_system_user_name) }}"
group: "{{ item.group | default(glance_system_group_name) }}"
with_items: "{{ glance_nfs_client }}"
# NOTE(cloudnull): During an upgrade the local directory may exist on a source
@ -111,7 +113,7 @@
mode: "0700"
- path: "{{ glance_system_user_home }}/cache/registry"
- path: "{{ glance_system_user_home }}/scrubber"
- path: "{{ glance_system_user_home }}/images"
- path: "{{ glance_system_user_home }}/{{ glance_nfs_local_directory }}"
mode: "0755"
- name: Install distro packages

View File

@ -84,7 +84,7 @@ default_store = {{ glance_default_store }}
stores = {% for backend in glance_available_stores %}{{ backend }}{% if not loop.last %},{% endif %}{% endfor %}
{% if 'file' in glance_available_stores %}
filesystem_store_datadir = {{ glance_system_user_home }}/images/
filesystem_store_datadir = {{ glance_system_user_home }}/{{ glance_nfs_local_directory }}/
{% endif %}
{% if 'swift' in glance_available_stores %}