Remove reviewdb config from Gerrit

This should only land once we are on Gerrit 3.x and happy with it. But
at this point the mysql reviewdb will not be used anymore and config for
it can be removed. We keep general mysql things like tools and backups
in place as the accountPatchReviewDb continues to live in MySQL.

This also comments out calls to jeepyb's welcome-message,
update-blueprint and update-bug entrypoints from the patchset-created
event hook, since they rely on database connections for the moment.
Calls to update-bug in change-abandoned and change-merged event
hooks are retained as those code paths don't rely on database
interaction nor attempt to load the removed configuration.

Change-Id: I6e24dbb223fd3f76954db3dd74a03887cf2e2a8b
This commit is contained in:
Clark Boylan 2020-10-09 10:53:23 -07:00 committed by Jeremy Stanley
parent 52094c441d
commit 1ccf5e68e5
4 changed files with 9 additions and 23 deletions

View File

@ -7,11 +7,12 @@ export PROJECTS_YAML=/var/gerrit/etc/projects.yaml
export PROJECTS_INI=/var/gerrit/etc/projects.ini
# Use timeout to kill any process running longer than 10 minutes.
timeout -k 2m 10m /usr/local/bin/update-blueprint patchset-created "$@"
timeout -k 2m 10m /usr/local/bin/update-bug patchset-created "$@"
timeout -k 2m 10m /usr/local/bin/notify-impact patchset-created "$@" --impact SecurityImpact --dest-address 'openstack-security@lists.openstack.org'
if [ -f /var/gerrit/etc/ssh_welcome_rsa_key ] ; then
timeout -k 2m 10m /usr/local/bin/welcome-message patchset-created \
--verbose --ssh-user=welcome-message \
--ssh-key=/var/gerrit/etc/ssh_welcome_rsa_key "$@"
fi
# TODO: reenable these once jeepyb no longer relies on the old Gerrit DB
#timeout -k 2m 10m /usr/local/bin/update-blueprint patchset-created "$@"
#timeout -k 2m 10m /usr/local/bin/update-bug patchset-created "$@"
#if [ -f /var/gerrit/etc/ssh_welcome_rsa_key ] ; then
#timeout -k 2m 10m /usr/local/bin/welcome-message patchset-created \
# --verbose --ssh-user=welcome-message \
# --ssh-key=/var/gerrit/etc/ssh_welcome_rsa_key "$@"
#fi

View File

@ -9,19 +9,6 @@
reportBugUrl = https://docs.openstack.org/infra/system-config/project.html#contributing
gitHttpUrl = https://{{ gerrit_vhost_name }}/
serverId = {{ gerrit_serverid }}
[database]
{% if gerrit_database_type == 'MYSQL' %}
type = MYSQL
hostname = {{ gerrit_mysql_host }}
database = reviewdb
username = gerrit2
url = jdbc:mysql://{{ gerrit_mysql_host }}/reviewdb?characterSetResults=utf8&characterEncoding=utf8&connectionCollation=utf8_bin&useUnicode=yes
poolLimit = 225
connectionpool = true
{% else %}
type = h2
database = tmp/reviewDb
{% endif %}
[auth]
contributorAgreements = true
type = OPENID_SSO

View File

@ -1,6 +1,4 @@
{% if gerrit_database_type == 'MYSQL' %}
[database]
password = {{ gerrit_mysql_password }}
[accountPatchReviewDb]
url = jdbc:mysql://{{ gerrit_mysql_host }}:3306/accountPatchReviewDb?characterSetResults=utf8&characterEncoding=utf8&connectionCollation=utf8_bin&useUnicode=yes&user=gerrit2&password={{ gerrit_mysql_password }}
{% endif %}

View File

@ -91,6 +91,6 @@ gerrit_run_init: true
gerrit_dev_storyboard_token: 4020000c-d1b9-4173-ab33-2f55dbc1c718
gerrit_dev_email_private_key: xxj2lTapostsobbxvpawhjhnzufaGxchrypoddcafqarrq5h
# These are here so that interpolation works in the main playbook. They
# are not actually used in the gerrit config.
# are not directly used in the gerrit config.
gerrit_dev_mysql_host: unused
gerrit_dev_mysql_password: unused