Commit Graph

196 Commits

Author SHA1 Message Date
Monty Taylor 5468f49254 Remove unused gerrit puppet things
We ain't using em.

Change-Id: I4ce9188a6b6a7e6a670e61bb17ab07e890faebcf
2020-04-19 10:59:25 -05:00
Monty Taylor df8a7e37f0 Don't run replication on gerrit startup
Full replication is very costly and makes gerrit restarts expensive
these days. Turn off replicate_on_startup.

Depends-On: https://review.opendev.org/678486
Change-Id: I31d81821c645697e72a8702c60e2482156e01bb0
2019-08-26 10:16:08 +02:00
Clark Boylan cb33dba40a Increate gerrit user connection limit by 50%
Zuul has hit a scenario where a git repo update was unable to talk to
gerrit via ssh because it had reached its per user connection limit [0].
This then led to some openstack job failing [1].

The default limit (which we were using) is 64 connection per user.
Apparently this is not quite enough for a busy zuul? Increase this by
50% up to 96.

[0] http://paste.openstack.org/show/754741/
[1] http://lists.openstack.org/pipermail/release-job-failures/2019-July/001193.html

Change-Id: Ibeca2208485608f3b61aa716184165342bfcc3c9
2019-07-22 15:29:19 -07:00
Monty Taylor e69c7b7fb9 Rename review.openstack.org to review.opendev.org
There are many references to review.openstack.org, and while the
redirect should work, we can also go ahead and fix them.

Change-Id: I28f398796a6392a3dffea1d25cfe2ae3a36a3589
2019-05-09 14:38:51 +00:00
Monty Taylor f4d74ee3e2 Use internal gitweb instead of gitea for now
We're not replicating refs/changes to gitea right now, so links
that point to cgit urls or gitea urls aren't going to work
for gitweb urls.

Change-Id: I71b4651dea5e627e2a7045b61d512047223b4ee8
2019-04-23 21:05:12 +00:00
Clark Boylan 16fa372e0c Redirect review.openstack.org to review.opendev.org
This is part of the opendev git hosting transition. We do this on
review.opendev.org/review.openstack.org and not files.openstack.org so
that ssh connections continue to work. This will need to be applied
during the maintenance window.

This also updates the canonical urls and logo.

Change-Id: I5bf4dcd6835e379fcdd2d55393c5a844578074a9
2019-04-17 20:50:20 +00:00
David Moreau Simard 8ed05c1340
Enable gerrit replication.autoReload for review-dev
This enables automatic reload of the replication configuration for
review-dev.

Depends-On: https://review.openstack.org/650049
Change-Id: I3be630339870d527bedcfbd84b8dc8084dc10f4b
2019-04-04 12:48:16 -04:00
Jeremy Stanley 83b493648a Add more \\ to launchpad-bug Gerrit tracking-id
The number of backslashes necessary to escape a value in a Gerrit
config managed in a Puppet manifest is astounding. We need four, so
make sure we have enough in the launchpad-bug tracking-id match
string value.

Change-Id: Ie2e757e77286ab34547d3950a18e8b1bb4eb2c5f
2018-12-21 23:03:01 +00:00
Zuul 418b13b086 Merge "Add a trackingid for Launchpad bug headers" 2018-12-21 21:37:00 +00:00
Monty Taylor dfe891af3e
Double the gerrit regex backslashes
The current amount of backslashes is not good enough for gerrit, and it
rejects the config file. Probably related to futureparser? In any case,
we need doubled-backslashes in the generated file, so 4 backslashes does
the right thing in the puppet.

Change-Id: I950b8efbcb876b2d1309f1117626a41ef22025b0
2018-09-27 08:17:53 -05:00
Clark Boylan f58a54c448 Logrotate track upstream logs
There is currently a single 3.6GB track_upstream.log logfile on
review.o.o. It has data from March 2017 through to today (October 2017).
Lets rotate this logfile and keep 30 days worth of logs to reduce its
impact on the local filesystem.

Change-Id: Id80ab28b3c7dc9881ac28f55fa07aa539a11787d
2017-10-18 14:16:01 -07:00
James E. Blair 59c3cc085b Bump gerrit account caches to 32768
Apparently we might need to keep all account entries in memory.
We currently have 26k accounts, so this gives us head room.

Change-Id: I33280ecc4c0bb24600ca78814e0a953d9dc696d7
2017-09-20 07:52:48 -07:00
Clark Boylan 8027936411 Pass gerrit cache options through to puppet-gerrit
We accepted these parameters at a system-config level but were not
passing through to puppet-gerrit manifest which actually writes out the
template file. Add these to the ::gerrit class instantiation.

Change-Id: I2abd24727ba39e3743b2d6b6ec279c70faf24d10
2017-09-19 14:05:15 -07:00
James E. Blair e2e893ba3b Bump gerrit account cache to 2048
We're currently at 1024 entries with a 64% hit rate.  Increase to
2048 to hopefully speed things up.

Change-Id: Ifeaf282a7cf0bd91342cc4ec24117ef64ed1054f
Depends-On: Iedb9fae62b133d76efeac5c8ecffde49704828c2
2017-09-19 18:04:46 +00:00
Ian Wienand ed89c58506 Switch review.o.o to cgit links
It was noticed that review.o.o doesn't have the "(cgit)" links next to
commit/parent hashes in the commit box.

It looks like the inbuilt gitweb integration is returning 404 for some
reason after the upgrade.  One option is to use the cgit integration
instead.  This seems to make some sense as cgit is behind a
load-balancer and may perform better than local cgi calls?

Note review-dev uses cgit like this, but that may be just
unintentional.

Change-Id: I86d8e724b22ee349f58540864888926d766daf1d
2017-09-19 16:28:15 +10:00
Jeremy Stanley d5dad4fd09 Stop using the Gerrit Contact Store
As part of the "Gerrit ContactStore Removal" specification, now that
owners.py is checking foundation membership when generating voter
rolls it's fine for us to stop using requireContactInformation on
the ICLA and rip out our accompanying configuration.

Note that this should not be merged until the All-Projects config on
review.openstack.org and review-dev.openstack.org has been manually
adjusted to remove the "requireContactInformation = true" line from
the [contributor-agreement "ICLA"] section therein. Further, this
must be done by pushing the necessary edit directly into
refs/meta/config as there is no WebUI control nor API method to
alter contributor-agreement options.

Change-Id: I8c39a6bf43f5b12db3e8aab18bedbf7e1a0f0b7e
Story: #2001094
Task: #4867
2017-08-04 20:24:37 +00:00
Jenkins dfa055b1ac Merge "Use https://docs.openstack.org everywhere" 2017-08-02 18:15:53 +00:00
Jenkins 4edde02abf Merge "Use new OpenStack logo on Gerrit sites" 2017-08-02 12:06:36 +00:00
Khai Do c857584ce7 upgrade review-dev.o.o with gerrit v2.13.9
This updates the gerrit war, plugin versions, and sets the new
accountPatchReviewDb url value to use mysql. Also uses updated Gerrit
query api paths for changeid and sha1 lookups in commentlinks.

Depends-On: Ifc04395f076200a68e6398190a0712c80e5278c6
Change-Id: Ic1a116b1608eb9134d18dad9463b9b9b142700fa
2017-07-05 10:57:10 -07:00
Jeremy Stanley 231e466548 Add a trackingid for Launchpad bug headers
Add a Launchpad trackingid in Gerrit for our standard
{Closes,Partial,Related}-Bug headers so that the tr/bug search
operator can be used to find them easily. This will need not only a
Gerrit restart (because it's changing the gerrit.config file), but
also a reindex (online reindex works fine for this).

The resulting configuration has already been tested on
review-dev.openstack.org and works as intended.

Change-Id: I113cb139ff5df1d6ec05f060dd3330ab44458a89
Depends-On: I99e16246e81b7ebc50e96054a2e3790aed0089bc
2017-06-05 18:14:21 +00:00
Clark Boylan e940f7737e Use https://docs.openstack.org everywhere
We have lots of links and redirects into docs.o.o using http but we host
via https now. Avoid unnecessary redirects and point directly at https.

Change-Id: I3a01533afa5915dcfc0a7220dd511819911108ca
2017-04-19 11:47:02 -07:00
Clark Boylan e8926d53d2 Use new OpenStack logo on Gerrit sites
This puts the new logo in place for our gerrit deployments. Had to move
the header nav bar slightly to the right to get this to look well
without overlapping significantly. Note that this has been tested
locally using firefox to render the changes.

Change-Id: I1d773e137dd41ac2d7ee9347941d95732dae0932
2017-04-19 11:46:57 -07:00
Monty Taylor bf456b38d1
Revert "Setup known_hosts file on gerrit servers"
The key is not in heira.

This reverts commit 956372cd39.

Change-Id: I19bc0f418318edc839c4eca168cd3c05ac7655f0
2017-04-07 05:40:09 -05:00
Jenkins c693c0a5e8 Merge "Setup known_hosts file on gerrit servers" 2017-04-04 18:44:46 +00:00
Khai Do 956372cd39 Setup known_hosts file on gerrit servers
Setup known_hosts file on review.o.o and review-dev.o.o so that
known services connecting to it won't be blocked.

Change-Id: If0b082867df73322a9115b94ea5be18d0631acc0
depends-on: I0bb6638f5362696cd9a9a7401cb2e96ab69eea06
2017-03-28 22:14:35 -07:00
Monty Taylor 0e4bcbe0b0
Add a minute argument to the track_upstream cron
Change-Id: I88d5d01d5284f1c1f1b86c6f59a1a12fffddea22
2017-03-23 14:07:17 -05:00
Monty Taylor 1df3932ece
Run track-upstream in a cronjob
After removing track-upstream from manage-projects, we need to run
track-upstream regularly. Add an hourly cronjob that will take care of
upstream tracking.

Change-Id: I7f5cb770e2af65fc2db9626eb1c8f01c3f3a64f1
Depends-On: I454b1ba400dc86abcc9b939564eb4eb7c324308c
2017-02-17 08:47:27 -06:00
Clark Boylan 663b7f57f6 Reduce local db backup retention to 10 days
This reduces overall backups by a third saving space on local disk. This
puts a greater reliance on offsite backups but we need those working
anyways.

Change-Id: I0397092646866fad1b828032a362f6814b88f26e
2017-01-25 11:22:09 -08:00
Monty Taylor cf952bdc77
Move gerrit's MySQL backups to gerrit homedir
The root partition on review.o.o is fairly small, and 30 days of backups
recently filled it up. On the other hand, we have plenty of space in
/home/gerrit2 - so just stick them there.

Change-Id: Ic8286ad175dedfa039b6563204fdf8d5681b9af9
2017-01-19 08:29:07 -06:00
Monty Taylor 34b36d3ed4
Switch SSO URL to login.ubuntu.com
It's the same site, but login.ubuntu.com is the 'real' one and
launchpad.net is an alias. login.launchpad.net seems to be less
important to the admins.

Change-Id: Ic3a68886fb846699860a58ea76c16f2749f05897
2016-12-13 10:54:03 -06:00
Monty Taylor 4cd96a9809
Switch review-dev.openstack.org to login.ubuntu.com
Change-Id: Ifbcd006c6149d2256c636ac440a67387c344bd7e
2016-12-13 10:53:46 -06:00
Jenkins 8321635338 Merge "Remove puppet for jeepyb's trivial rebase script" 2016-08-08 12:54:32 +00:00
Jeremy Stanley 4e689e4b86 Ensure git cronjob absent for correct user
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: I34f45bf186ed1739b74c70a2bec444aed83ee8d5
2016-08-05 15:58:28 +00:00
Khai Do 06e9f31d05 Add storyboard task to Gerrit tracking id
Save storyboard tasks to Gerrit's secondary index[1]

[1] https://review.openstack.org/Documentation/config-gerrit.html#trackingid

Change-Id: I06e8f70fefdbb6e0d654aa05ad26538beb1e92fd
2016-07-26 09:58:06 -07:00
Khai Do f1ca18ebfd Configure its-storyboard plugin
Add configurations for the its-storyboard plugin:
1. Move java_home variable to a higher level module so it can be used
   to install certificate on review-dev.o.o
2. Configure its-storyboard for review.o.o and review-dev.o.o
3. Associate review.o.o with storyboard.o.o and review-dev.o.o with
   storyboard-dev.o.o
4. Import ssl certificate to java on review-dev.o.o so that the plugin
   can POST updates to storyboard-dev.o.o using storyboard REST APIs.
5. Configure rules (or conditions) telling its-plugin to update
   storyboard tasks status on specific gerrit change updates.

Gerrit change to storyboard task transition mapping:
change abandoned -> SB task set to 'todo'
change createed or change restored -> SB task set to 'review'
change merged -> SB task set to 'merged'

Change-Id: Id6ec16e267fca5fbbc42b1d3547fc5d2fa4c671b
depends-on: I9f47a2ed88ffbe827e494a478c0dc89a08bbe370
depends-on: I5e817fab8a8973b688fd44dd819e3616df171321
2016-07-26 09:29:17 -07:00
Jenkins f5ba5ef6ee Merge "Set cron job to gc repositories instead of repack" 2016-07-21 23:18:58 +00:00
Jenkins 26a8188f09 Merge "Override commit message length validation to 72 chars" 2016-07-20 19:59:41 +00:00
Khai Do 63dac37550 Remove puppet for jeepyb's trivial rebase script
Change I37337b9d07ace4 disabled the use of jeepyb's trivial rebase
script however the puppet for it still exists.  There's really no need
to keep the option around in the puppet manifest so this change just
removes it.

Change-Id: I101e385823a110a74b3060ad11e3e528d5048d9f
2016-07-20 10:16:27 -07:00
Jenkins 771e3f1456 Merge "Make git protocol point to git.o.o" 2016-07-19 20:49:51 +00:00
Khai Do e4744ad78c Set cron job to gc repositories instead of repack
Change I4e171b17a7b4 replaced repack with gc for the git replication
and mirrors but did not include the repos for the gerrit site.  This
will change will enable gc for the repos in the gerrit site and local
replication on review.o.o

Change-Id: I2ff5f40830c3753f24e65dfb44ae9272266d7be1
Depends-on: I7a5364a07c3e07ffc9a053a73fab0c16861fc1c5
2016-07-14 13:00:46 -07:00
Khai Do 082c70205c Override commit message length validation to 72 chars
By default Gerrit's commit validation plugin is set to check commit
message for max length of 70 however Openstack documentation[1]
says max commit message length should be 72.  Configure Openstack's
gerrit to match documentation.

[1] https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure

depends-on: Id7aff7d6d7250da804c690fbe6ff5b81f408d113
Change-Id: I6571fe4e894c973a4b74857118e726b70e89e2a4
2016-06-25 07:13:07 -07:00
Jenkins a26987ca7f Merge "Refactor gerrit commentlinks parameter" 2016-06-23 00:17:00 +00:00
Khai Do 0e89f115a3 run git gc instead of repack for git repos
Run git gc instead of repack on all repos.  Testing[1] indicates that
gc-ing reduces repo size and helps maintain better performance for
apps that host the repos.

remove git pack-refs because a git gc enables packRefs by default[2]

[1] http://lists.openstack.org/pipermail/openstack-infra/2016-June/004403.html
[2] https://git-scm.com/docs/git-gc

Change-Id: I4e171b17a7b4107c992d0e3cc0e7bff3d9599526
2016-06-17 15:12:51 -07:00
Khai Do 169496396b Refactor gerrit commentlinks parameter
Refactor the commentlinks to allow review.o.o and review-dev.o.o to
define seperate comment links.  We essentially want to point
review.o.o story links to storyboard.o.o and review-dev.o.o links to
storyboard-dev.o.o

Change-Id: I70e5791a76ca97756613c393e598978ec13c8271
2016-06-16 23:14:34 -07:00
Khai Do a08b5a65cc Limit the file size that can be pushed to Gerrit
We need to limit the size of the files that can be uploaded to
Gerrit because large files can break replication to Github due to
Github's size restrictions.  We've seen this happen with users
pushing large binary files.

Change-Id: Iff1fb7c83756ccfc73d39585db93655ffe88b136
depends-on: Iad06bfc421ce73aeb1e1496f86cc244624599bec
2016-05-16 16:00:05 -07:00
Jenkins a84dccb530 Merge "Customize Gerrit's download command and schema" 2016-05-15 10:37:21 +00:00
Andreas Jaeger a4b42f9dac Revert "Fix URL detection in testresult match"
The new regex shows all jobs - but it does not show anymore Success/fail and the job run times.

This reverts commit 48e8f7e937.

Change-Id: I99896753342a9082f922df645ece82c5a8af78e7
2016-05-05 19:26:18 +00:00
Ian Wienand 48e8f7e937 Fix URL detection in testresult match
This regex dates from the original commit
(Idb4ad8e6079165d681271987a92cab5d8b7c81be) where I think the negative
matches are intended to stop matching between groups.

I don't think this is necessary.  In particular, the negative match on
the last group ($4) means that it will not match if there is a URL in
the free-form text portion.

I've simplified this and also added some comments to make it clear
what it is looking for.

Change-Id: I863d88e9a7ed2fd41924b8fc4a12dbea3ee2b205
2016-05-04 20:21:50 +02:00
Khai Do 01136c8320 Customize Gerrit's download command and schema
Configure Gerrit's download plugin to show all available
protocol to our openstack repos in the downloads list.
We support ssh, anonymous http, and anonymous git. Set to
not show http because it duplicates anon_http due to
change I24946f5feea

Depends-on: Ia6a3a28cce62b6bd1570fd0ab5b1224fc35d8284
Change-Id: I6d34e75da71186ca4744525fd1143e75b4394a18
2016-04-07 19:38:50 +00:00
Khai Do 5331c0a5a2 Make git protocol point to git.o.o
Openstack supports the git protocol (git://git.openstack.org/)
for accessing our repros[1].  The anoymous git download command
on the Gerrit change screen points to review.o.o We prefer it
to point to the cgit servers because  those are faster and
there are many more of them.

[1] https://git.openstack.org/cgit/openstack-infra/system-config

Change-Id: I7989769b3e702c9f924b76e862e775d5717fb529
Depends-on: I5bd57d91b4d4a685328efe4d589a191debaa0fe5
2016-04-04 16:07:46 -07:00