Collect docker logs as root
When testing our system-conf configuration we don't actually add zuul to the docker group. This means the zuul user cannot access the docker socket. This then breaks docker container log collection. Address this by becoming root when collecting logs. Change-Id: Ic0232f7ef458cdd07fb0853f97f2dc22ce137c71
This commit is contained in:
parent
312cadf53f
commit
6f9c151e79
@ -18,6 +18,14 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- include_role:
|
- include_role:
|
||||||
name: collect-container-logs
|
name: collect-container-logs
|
||||||
|
# The zuul user isn't part of the docker group on our fake
|
||||||
|
# production systems. Work around this by operating as root
|
||||||
|
# when collecting logs. This collects podman containers
|
||||||
|
# running as root; we may need to think about some flags for
|
||||||
|
# this role for collecting logs from containers under other
|
||||||
|
# users.
|
||||||
|
apply:
|
||||||
|
become: yes
|
||||||
vars:
|
vars:
|
||||||
container_command: "{{ item }}"
|
container_command: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user