system-config/playbooks/roles/gerrit/templates/docker-compose.yaml.j2
Clark Boylan 7c9d9d7993 Remove Gerrit's JVM GC logs
These were added when we faced significant memory pressure on the old
server. That is no longer a problem and there is an issue with the
specification that breaks file compression due to destination files
already existing. It seems like the log specification is only able to
rotate once then it cannot keep moving files aside because they already
exist as eg jvm_gc.log.0.gz. This results in annoying errors in the
Gerrit error_log.

Note that it doesn't appear sufficient to remove this log specification
we also need to move the existing jvm_gc.log* files aside or delete
them. This was tested on a held zuul node and I stopped gerrit, updated
the docker-compose file, moved the files aside, then started gerrit and
that got rid of the startup errors in error_log. Merely updating
docker-compose resulted in the same errors on startup.

Change-Id: Ied1464c57b2e8331b9bdf7cbc9ad74f92dea2dfd
2022-02-24 14:41:17 -08:00

55 lines
1.6 KiB
Django/Jinja

version: '2'
services:
mariadb:
image: docker.io/library/mariadb:10.4
network_mode: host
environment:
MYSQL_ROOT_PASSWORD: "{{ gerrit_reviewdb_mariadb_password }}"
MYSQL_DATABASE: "{{ gerrit_reviewdb_mariadb_dbname }}"
MYSQL_USER: "{{ gerrit_reviewdb_mariadb_username }}"
MYSQL_PASSWORD: "{{ gerrit_reviewdb_mariadb_password }}"
volumes:
# NOTE(ianw) : mounted under /home/gerrit2 (rather than more
# usual /var/ in our configs) to keep everything together on the
# storage attached at /home/gerrit2 on the server.
- /home/gerrit2/reviewdb:/var/lib/mysql
logging:
driver: syslog
options:
tag: "docker-mariadb"
gerrit:
image: {{ gerrit_container_image }}
depends_on:
- mariadb
command: ["/wait-for-it.sh", "127.0.0.1:3306", "--", "/run-gerrit.sh"]
network_mode: host
user: gerrit
stop_signal: SIGHUP
stop_grace_period: 5m
volumes:
{% for volume in gerrit_container_volumes %}
- {{ volume }}
{% endfor %}
environment:
JAVA_OPTIONS: >-
-Dlog4j2.formatMsgNoLookups=true
{% if gerrit_heap_limit is defined %}
-Xmx{{ gerrit_heap_limit }}
{% endif %}
ulimits:
core: 0
nofile: {{ gerrit_packed_git_open_files * 2 }}
cap_add:
- SYS_PTRACE
# Utility "service" to allow us to run ad-hoc commands
shell:
image: {{ gerrit_container_image }}
restart: 'no'
command: /bin/true
network_mode: host
user: gerrit
volumes:
{% for volume in gerrit_container_volumes %}
- {{ volume }}
{% endfor %}