Move jgit autogc disablement into correct config

The receive.autogc configuration apparently needs to be in its own
file, not in the general gerrit.conf. Move it to the correct
location.

https://review.opendev.org/Documentation/config-gerrit.html#jgit-receive

While we're here, correct the filename on the gerrit.config and
secure.config templates to make it clear they're jinja2 files, and
add a file mode to the replication.config where it was missing.

Change-Id: I9243bccac103c51ee435725aae482731642a37cc
This commit is contained in:
Jeremy Stanley 2020-12-01 20:18:00 +00:00
parent c91ead8c05
commit cc04abd39d
4 changed files with 13 additions and 3 deletions

View File

@ -0,0 +1,2 @@
[receive]
autogc = false

View File

@ -63,7 +63,7 @@
- name: Write Gerrit config file
template:
src: gerrit.config
src: gerrit.config.j2
dest: "{{ gerrit_site_dir }}/etc/gerrit.config"
owner: "{{ gerrit_user_name }}"
group: "{{ gerrit_user_name }}"
@ -71,7 +71,7 @@
- name: Write Gerrit secure config file
template:
src: secure.config
src: secure.config.j2
dest: "{{ gerrit_site_dir }}/etc/secure.config"
owner: "{{ gerrit_user_name }}"
group: "{{ gerrit_user_name }}"
@ -83,8 +83,17 @@
dest: "{{ gerrit_site_dir }}/etc/replication.config"
owner: "{{ gerrit_user_name }}"
group: "{{ gerrit_user_name }}"
mode: 0644
when: gerrit_replication is defined
- name: Write Gerrit JGit config
copy:
src: jgit.config
dest: "{{ gerrit_site_dir }}/etc/jgit.config"
owner: "{{ gerrit_user_name }}"
group: "{{ gerrit_user_name }}"
mode: 0644
# Server host key for SSH service on port 29418
- name: Write Gerrit SSH host private key
copy:

View File

@ -74,7 +74,6 @@
[receive]
maxObjectSizeLimit = 100 m
enableSignedPush = false
autogc = false
[commentlink "bugheader"]
match = "([Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug:\\s*#?(\\d+)"
link = "https://launchpad.net/bugs/$2"