Remove redundant file management for /run/redis

We can remove the systemd options since the directory is managed by
tmpdir, and the mount has the needed "z" flag for relabelling.

The RuntimeDirectory instructs systemd to create AND remove the
directory - this might lead to an issue where init_t isn't allowed to
unlink a container_file_t file/directory

The ExecStartPre is running in init_t context, and might be denied to
chcon file/directory to container_file_t.

It should resolves rhbz#1860423 while making things cleaner and clearer.
This is also the only place where we actually use the
`systemd_exec_flags`.

Change-Id: Ie938d9dd7d74db3907eb546765236b025bff1abe
(cherry picked from commit 9b894ecb69)
(cherry picked from commit c59f31ea4d)
This commit is contained in:
Cédric Jeanneret 2020-07-27 08:01:10 +02:00 committed by Emilien Macchi
parent 6c7ccc9347
commit 76e284311a
1 changed files with 0 additions and 3 deletions

View File

@ -167,9 +167,6 @@ outputs:
net: host net: host
privileged: false privileged: false
restart: always restart: always
systemd_exec_flags:
RuntimeDirectory: redis
ExecStartPre: /bin/chcon -t svirt_sandbox_file_t /var/run/redis
healthcheck: healthcheck:
test: /openstack/healthcheck test: /openstack/healthcheck
volumes: volumes: