Gerrit supports turning off the automatic full replication on startup.
The default config value is on, so set the default here to on as well
so that this is not a behavior change. OpenDev will want to set this
to false.
Change-Id: Ibb16d212ace90750ced51ff43e714532144f577c
The default value upstream is 0, which is to not timeout stale
connections. This can lead to an increasing collection of stale
connections for a user behind a flaky connection, which can eventually
cause them to hit their connection limit.
Set a default to 1 hour, which should cause us to stop accumulating
these.
Change-Id: Icd27dccabbbe33230c2d60185cbc9d405c07fc37
The default is now 90 seconds and we run into that and timeout which
confuses systemd. To avoid confusing systemd increase the timeout to its
old value of 300 seconds which worked back with older Gerrit. Hopefully
this doesn't confuse systemd anymore.
Change-Id: I8476c832f950e18035e11f225202eff8572f5ce8
We need to set type = gitweb. Also, the gitweb script itself
is in /usr/share from the git package.
Change-Id: I7e73a0ba721ed93e4acf308821ad3efd3d5eb4c8
If we want to link directly to opendev urls, we need gerrit to
understand what the link structure looks like. Add support.
Change-Id: I8efefe365f3b9ebe97c8c2ce322fa8c6f3b70b3a
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.
This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.
This update should result in no functional change.
For more information see the thread at
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html
Change-Id: I4d99b4b6a09b2d3bdcfff152afac767b76777340
This reverts commit 5c44d09dc7.
This change forced us to do an offline reindex whenever the war was
updated. Unfortunately, that means even on minor upgrades we do a long
reindex, which times out in puppet, then puppet fails as does an
upgrade.
You can address this by setting offline_reindex = true when doing a new
install, then flip that to false (the default) once the new install is
bootstrapped.
Change-Id: I1f730a1cd2bcf96e6b94f2d0a82078f46d49e0ce
The Gerrit init process likes to rename these libs and it cannot do so
when they are owned by root. Update the process to download and install
the libs out of band of the init process to run as gerrit2 so that these
libs are owned by the gerrit2 user.
Change-Id: I1b619a64c5e324fa8d0c24ef02ace9561c382475
Sometimes one would like to only replicate a subset of the refs in
a git repo, such as not replicating refs/changes.
Change-Id: Ibf6c02d59c6901f82be6a96b676b1bd28c4b61f7
On puppet 4, the tests were failing because the new ordering algorithm
caused the gerrit initializer exec resource to happen before the
database was set up. This patch adds an explicit ordering to the
gerrit::mysql class in the test fixtures to ensure the database is set
up first. This shouldn't be an issue in real life because we don't use
puppet to set up the database.
Also override the vhost_name and canonical server name parameters with
'localhost' since the $fqdn fact on test nodes can be wonky without some
extra setup.
Also add a conditional to the ssl-cert group exec so that it doesn't run
every time. Unfortunately this is not enough to make the tests
idempotent since the tidy resource behaves strangely when the directory
contains a symlink.
Change-Id: I56174d98496cd640b5b6490650a643c1aed740f7
The logic in the Gemfile was relying on Zuulv2 variables to find out
whether the spec helper gem was already available on disk, and since
Zuulv3 has changed things it was failing to find it and downloading the
master version instead. This patch ensures the Gemfile looks for the gem
in the right place when running in CI.
Change-Id: I66ee4529d821acd41663a83fc371d36de0333fcd
Looking at puppet-openstackci, it seems this is the logic needed to
start using our centralized spec helper scripts.
Change-Id: I5b21f6fe14bf288f27f45e0b6c0e58db35b64d71
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Gerrit allows for multiple footers in a single trackingid. If a
footers list is provided, iterate through all its entries; if not
though, we should continue supporting the old footer string
as a fallback.
Change-Id: I99e16246e81b7ebc50e96054a2e3790aed0089bc
Gerrit, as of 2.12, no longer implements the Contact Store
subfeature for their contributor agreement implementation.
OpenStack's Gerrit deployment no longer relies on this, and it's
likely they were the only actual consumer to start with so probably
safe to clean up at this point.
Change-Id: I50572d436b9d59a6184576adb5c27a3fc0fbec04
Depends-On: I8c39a6bf43f5b12db3e8aab18bedbf7e1a0f0b7e
Story: #2001094
Task: #4869
Testing on review-dev has shown that newer gerrit won't support utf8
properly unless we explicitly enable utf8 on the mysql jdbc string.
Without this non ascii characters get entered into the db as literal
"?". Go ahead and add explicit utf8 parameters to the database url in
this change.
Note that this should be safe on older gerrit too as gerrit should
ignore any config options it doesn't know about.
Change-Id: Ib097f93951904951a285ec40a21096988fb13562
Add accountPatchReviewDb.url as a configurable option to the secure
config file (we put it in secure config as the url likely contains a
database password in it). This is a new database in Gerrit 2.13 which
will default to using an H2 db in review_site/db if a url is not
specified.
Note that this database must have a different name than the review
database (called 'reviewdb' by this module) and if they are the same
that database will be dropped and you will have a sad afternoon.
Change-Id: Ifc04395f076200a68e6398190a0712c80e5278c6
Remove all spec assertions for the existence of files. We can assume
that if the puppet finished successfully then the config files were also
laid down correctly. We remove these checks instead of updating the test
for /home/gerrit/id_rsa.pub which was moved to
/home/gerrit/.ssh/id_rsa.pub.
Remove all spec assertions for the existence of packages. Again, we can
assume that if puppet finished successfully then the package was found
and installed. We remove these checks instead of updating the test for
the JRE package to point to the new Xenial package.
Don't set java_home in the gerrit class since the module should be
setting the right default for us based on the release.
Make mysql config changes prompt a service restart (only in the
fixture). gerrit::mysql sets sql-mode to remove NO_ZERO_DATE, but the
mysql module doesn't restart the service by default when the config
changes and bindep preinstalls mysql so the service is already started
when my.cnf is set.
Update the beaker nodeset and spec helper to run on xenial and install
puppet from the Ubuntu repos instead of from puppetlabs since puppetlabs
doesn't support puppet 3 on xenial.
Change-Id: I0b6db86a76fc532443f80d6cbed2b1ef6ca9605e
First, add a params class so that we can distinguish between java packages
on different Ubuntu releases.
Set sql-mode for mysql to remove NO_ZERO_DATE mode so gerrit can
initialize. If not removed, gerrit tries to create the
account_group_by_id_aud table with column added_on with a default value
of 0 and fails. This is only important for CI and downstream since
Infra's gerrit instance uses trove instead of a local database.
Depends-On: If25da754ec107b8dba2d9343f16b54b99cc88e01
Change-Id: Ifd2244ae9dd212b2475f9cd6adb994bc058a4769
Bindep is a tool for checking the presence of binary packages needed
to use an application / library. It started life as a way to make it
easier to set up a development environment for OpenStack projects.
Change-Id: Ie8c9ef414d23102797197ad2811084c54ed9bee2
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
offline_reindex is not used by the gerrit.config template. It is only
used by puppet itself to know whether or not to perform an offline
reindex during the upgrade process of a gerrit installation.
Change-Id: I9614691e083f38f1b9c367817c394bf1367e6939
puppet-lint finally released a new major version that enforces the
not-that-new-anymore puppet style guide. This patch updates the
parameter list to avoid the "optional parameter listed before required
parameter" lint warning that is causing the lint jobs to fail.
Change-Id: I7fb22744f91a1c710ba8bf0332d2c4f8995d2ad7
We serve robots.txt out of the gerrit static dir, but did not allow
apache to access it. This corrects that.
Change-Id: Ibf7338641247bb5f66e3a9d7be92ce45a72da1fd
A fresh install of gerrit was refusing to start with
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) No index versions ready; run Reindex
Because we pre-populate some of the directories in review_site, gerrit
init thinks it is in an upgrade situation and does not create or touch
the index. Thus manually create the index when we are initalising a
new site.
Also, the gerrit-reindex doesn't have to subscribe to the
gerrit-initial-init; it should only be triggered on updates if
offline-indexing is wanted/required.
Change-Id: I98ce9ff87570a86e9b58b38d0605313ee5ee2758
Add a parameter to tell puppet to run a gerrit offline reindex. Since
newer versions of Gerrit has online reindex we may not want to run
offline reindex anymore.
Change-Id: I9f3b0c1581f81cc0788173c7625b4c8c99ac9ab7
When removing a cron resource by setting it absent, it must continue
to specify the user if it wasn't root (the default) since crontabs
are per-user files.
Change-Id: Id68051821b0cca8bbf3e90446f5d915ac9d32be4
The 'event-type' reference should be 'event_type' instead.
Also fixed a bug in the documentation and subsequent beaker test.
Change-Id: I4802f49e1fb1d3210aa49b4fe12a6e33a9f3bd42
This change will allow puppet to configure the its-storyboard plugin.
Settings in gerrit.config and secure.config is to associate gerrit
with an its plugin and settings in actions.config is to tell the
plugin to do something when a gerrit change gets updated. These
conditions are provided by the its-base plugin[1].
[1] https://gerrit.googlesource.com/plugins/its-base/+/stable-2.11/src/main/resources/Documentation/config-common.md
Change-Id: I9f47a2ed88ffbe827e494a478c0dc89a08bbe370