Page MenuHomePhabricator

Switch Gerrit from Java 8 to Java 11
Closed, ResolvedPublic

Description

Our Gerrit servers (gerrit1001 and gerrit2001) have been upgraded to Debian Buster. At the time we kept using Java 8 to avoid mixin concerns or we were still on Gerrit 2.15.

Gerrit 3.2 definitely supports Java 11 and Java 8 is deprecated. We should thus switch the jdk.

Event Timeline

The puppet bits are preparation work to let us "trivially" switch from java 8 to java 11.

What worries me is whether our compiled plugin would actually work with java 11, pretty sure they got compiled with java 8 and maybe that will just work but I would like to avoid testing in production.

My plan was/is to:

Ideally all plugins would support standalone build. I gave it a try and send a patch upstream but haven't followed up on the review https://gerrit-review.googlesource.com/c/plugins/metrics-reporter-jmx/+/302102

I would like the extra plugins to be tracked via git, so we can tentatively fork some if need be. I haven't quite found an idea solution for that though.

If one feels adventurous, a switch to java 11 can be tried. Maybe the plugins will just work and that will complete this task.

hashar triaged this task as Medium priority.May 21 2021, 12:11 PM

Change 694523 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/puppet@production] gerrit: add Java 11 packages

https://gerrit.wikimedia.org/r/694523

Change 694524 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/puppet@production] gerrit: switch to Java 11

https://gerrit.wikimedia.org/r/694524

@MoritzMuehlenhoff and I will do the Java 11 upgrade on Tuesday June 1st slightly after 7am UTC / 9am CEST.

Maintenance plan

Rollback plan

Change 696591 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/puppet@production] gerrit: remove Java 8 packages

https://gerrit.wikimedia.org/r/696591

Change 694523 merged by Muehlenhoff:

[operations/puppet@production] gerrit: add Java 11 packages

https://gerrit.wikimedia.org/r/694523

Mentioned in SAL (#wikimedia-operations) [2021-06-01T08:02:43Z] <hashar> Restarted Gerrit on gerrit2001 for Java 11 upgrade # T268225

Mentioned in SAL (#wikimedia-operations) [2021-06-01T08:03:59Z] <hashar> Restarted Gerrit on gerrit1001 for Java 11 upgrade # T268225

Huge thank you to @MoritzMuehlenhoff for suggesting to manually test the command on the replica, that caught that some options passed to java were no more recognized by Java 11. Gerrit has been running fine under java 11 for a couple hours now and seems all fine.

The pending puppet patches will be merged at some point this afternoon.

Change 694524 merged by Muehlenhoff:

[operations/puppet@production] gerrit: switch to Java 11

https://gerrit.wikimedia.org/r/694524

Both Gerrit are running with Java 11 and Puppet is up to date. We are keeping the Java 8 packages around in case we need to roll back, will drop them in a few days and then mark the task resolved.

We will remove the Java 8 packages on Monday (June 7th)

Change 696591 merged by Muehlenhoff:

[operations/puppet@production] gerrit: remove Java 8 packages

https://gerrit.wikimedia.org/r/696591

Mentioned in SAL (#wikimedia-operations) [2021-06-07T12:36:28Z] <moritzm> removing now obsolete Java 8 packages from contint* T268225

Mentioned in SAL (#wikimedia-operations) [2021-06-07T12:41:30Z] <moritzm> removing now obsolete Java 8 packages from gerrit* T268225