openstack-ansible-os_nova/templates/nova-systemd-tempfiles.j2
Paulo Matias 1d4c3ad6ec Fix permissions for the Nova lock directory in systemd
The directory set as `lock_path` in `nova.conf` must be created with
the nova system user as its owner, otherwise the VIF plugin would fail
to acquire a lock when launching an instance.

Here we set up systemd to create this directory with correct owner and
permissions, besides moving its path to a `nova_lock_path` variable.

Apparently, the `/var/lock/{{ item.value.service_name }}` directory,
which is also created by `nova-systemd-tempfiles.j2`, is not needed at
all. But as this patch is intended to be backported to a stable release,
we keep it by now to avoid any unforeseen issues.

Change-Id: I9886778eddc23f0f71dfdfc87f4f715054946b3d
Closes-Bug: #1636604
2016-10-27 17:24:50 -02:00

6 lines
317 B
Django/Jinja

# {{ ansible_managed }}
D /var/lock/{{ item.value.service_name }} 2755 {{ nova_system_user_name }} {{ nova_system_group_name }}
D /var/run/{{ item.value.service_name }} 2755 {{ nova_system_user_name }} {{ nova_system_group_name }}
D {{ nova_lock_path }} 2755 {{ nova_system_user_name }} {{ nova_system_group_name }}