openafs-client: add service timeout override

Starting the openafs-client service is an intensive operation as it
walks the cache registering various things.  We've seen on our
production ARM64 mirror this can take longer than the 1:30 default
timeout.  This is a fatal issue, as the module will try to unload
while afsd is still spinning and working resulting in completely
corrupt kernel state.

This is about double the longest time we've seen, so should give
plenty of overhead.

Change-Id: I37186494b9afd72eab3a092279579f1a5fa5d22c
This commit is contained in:
Ian Wienand 2021-06-16 11:47:52 +10:00
parent f2859c55de
commit 65991cf92e
4 changed files with 28 additions and 1 deletions

View File

@ -43,3 +43,10 @@ role has limited platform support. Currently supported are
:default: no
Enable or disable gpg checking for ``openafs_yum_repo_url``
.. zuul:rolevar:: openafs_client_service_timeout_sec
:default: 480
The TimeoutSec for service start. Accounting for the cache
during startup can cause a high load which may necessitate
a longer startup timeout on some platforms.

View File

@ -1,3 +1,4 @@
openafs_client_cell: 'openstack.org'
openafs_client_cache_directory: '/var/cache/openafs'
openafs_client_cache_size: 500000
openafs_client_cache_size: 500000
openafs_client_service_timeout_sec: 480

View File

@ -62,6 +62,23 @@
mode: 0700
become: yes
- name: Set timeout override
become: yes
block:
- name: Create service override directory
file:
path: '/etc/systemd/system/openafs-client.service.d'
state: directory
owner: root
group: root
mode: 0755
- name: Save override
template:
dest: '/etc/systemd/system/openafs-client.service.d/timeout.conf'
src: 'timeout.conf.j2'
group: root
mode: 0644
- name: Setup OS specific openafs-client environment
include_tasks: "{{ lookup('first_found', params) }}"
vars:

View File

@ -0,0 +1,2 @@
[Service]
TimeoutSec={{ openafs_client_service_timeout_sec }}