openafs-client: add option for OpenAFS cache location
Our control plane servers generally have large ephemeral storage attached at /opt; for many uses this is enough space that we don't need to add extra cinder volumes for a reasonable cache (as we usually do on mirror nodes; but there we create large caches for both openafs and httpd reverse proxy whose needs exceed even what we get from ephemeral storage). Add an option to set the cache location, and use /opt for our new static01.opendev.org server. Change-Id: I16eed1734a0a7e855e27105931a131ce4dbd0793
This commit is contained in:
parent
4d2b018ed9
commit
22c5561df3
@ -9,4 +9,5 @@
|
||||
- kdc04.openstack.org
|
||||
- role: openafs-client
|
||||
openafs_client_cache_size: "{{ afs_client_cache_size | default(50000000) }}" # 50GiB
|
||||
openafs_client_cache_directory: '/opt/cache/openafs'
|
||||
- role: static
|
||||
|
@ -20,12 +20,17 @@ role has limited platform support. Currently supported are
|
||||
.. zuul:rolevar:: openafs_client_cell
|
||||
:default: openstack.org
|
||||
|
||||
The default cell
|
||||
The default cell.
|
||||
|
||||
.. zuul:rolevar:: openafs_client_cache_size
|
||||
:default: 500000
|
||||
|
||||
The AFS client cache size, in kilobytes
|
||||
The OpenAFS client cache size, in kilobytes.
|
||||
|
||||
.. zuul:rolevar:: openafs_client_cache_directory
|
||||
:default: /var/cache/openafs
|
||||
|
||||
The directory to store the OpenAFS cache files.
|
||||
|
||||
.. zuul:rolevar:: openafs_client_yum_repo_url
|
||||
:default: ``https://tarballs.openstack.org/project-config/package-afs-centos7``
|
||||
|
@ -1,2 +1,3 @@
|
||||
openafs_client_cell: 'openstack.org'
|
||||
openafs_client_cache_directory: '/var/cache/openafs'
|
||||
openafs_client_cache_size: 500000
|
@ -45,6 +45,15 @@
|
||||
- ThisCell
|
||||
become: yes
|
||||
|
||||
- name: Ensure cache location directory
|
||||
file:
|
||||
path: '{{ openafs_client_cache_directory }}'
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0700
|
||||
become: yes
|
||||
|
||||
- name: Setup OS specific openafs-client environment
|
||||
include_tasks: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
|
@ -1 +1 @@
|
||||
/afs:/var/cache/openafs:{{ openafs_client_cache_size }}
|
||||
/afs:{{ openafs_client_cache_directory }}:{{ openafs_client_cache_size }}
|
||||
|
Loading…
Reference in New Issue
Block a user