tripleo-common/container-images/kolla/cinder-volume
Alan Bishop ae31ba5e04 TCIB: Add cinder-volume extend_start.sh script
Add an extend_start.sh script for the cinder-volume service that
recursively chowns /var/lib/cinder to cinder:kolla. This ensures
cinder has permission to access the directory, especially in
situations where the directory may be owned by root.

Just like kolla itself did prior to tripleo's switch to TCIB, the
recursive chown is conditional on whether the top level /var/lib/cinder
directory isn't already owned by cinder:kolla. This is done so the
chown is only run once, which prevents slow service startups when the
directory contains a large number of entries.

Note: There was an initial fear that a recursive chown could traverse
onto any NFS share mounted by cinder. However, the extend_start.sh
script runs on container startup, prior to when cinder would create
any mounts. Even restarting the cinder-volume container is safe,
because NFS shares are automatically unmounted during the container
restart.

Closes-Bug: #1908750
Change-Id: I2d82c1ca86735d2a8d69b3e28e8cea7acd637f0b
(cherry picked from commit 1b45bb8838)
(cherry picked from commit 5668f23975)
2021-01-22 08:50:39 +00:00
..
cinder-volume-sudoers TCIB: Add cinder-volume extend_start.sh script 2021-01-22 08:50:39 +00:00
extend_start.sh TCIB: Add cinder-volume extend_start.sh script 2021-01-22 08:50:39 +00:00