Browse Source

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
changes/78/796578/1
Ian Wienand 1 year ago
parent
commit
65991cf92e
  1. 7
      roles/openafs-client/README.rst
  2. 3
      roles/openafs-client/defaults/main.yaml
  3. 17
      roles/openafs-client/tasks/main.yaml
  4. 2
      roles/openafs-client/templates/timeout.conf.j2

7
roles/openafs-client/README.rst

@ -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.

3
roles/openafs-client/defaults/main.yaml

@ -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

17
roles/openafs-client/tasks/main.yaml

@ -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:

2
roles/openafs-client/templates/timeout.conf.j2

@ -0,0 +1,2 @@
[Service]
TimeoutSec={{ openafs_client_service_timeout_sec }}
Loading…
Cancel
Save