Page MenuHomePhabricator

Remove Java 6 from ytterbium.wikimedia.org (Gerrit production host)
Closed, DeclinedPublic

Description

There is a leap second being inserted on June 30th. The OpenJDK v6 does not have the fix hence we should switch Gerrit to run Java 7 and remove java 6 from ytterbium.wikimedia.org (if at all possible).

/usr/bin/java points to Java 6:

$ ls -l /etc/alternatives/j*|grep java-6
Aug 27  2013 /etc/alternatives/java -> /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java
Aug 27  2013 /etc/alternatives/java.1.gz -> /usr/lib/jvm/java-6-openjdk-amd64/jre/man/man1/java.1.gz
Aug 27  2013 /etc/alternatives/javaws -> /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws
Aug 27  2013 /etc/alternatives/javaws.1.gz -> /usr/lib/jvm/java-6-openjdk-amd64/jre/man/man1/javaws.1.gz
Aug 27  2013 /etc/alternatives/jexec -> /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/jexec
Aug 27  2013 /etc/alternatives/jexec-binfmt -> /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/jar.binfmt

Though /var/lib/gerrit2/review_site/etc/gerrit.config has:

gerrit.config:37:    javaHome = /usr/lib/jvm/java-7-openjdk-amd64/jre

So it is all about purging Java 6 from ytterbium.wikimedia.org isn't it?

Event Timeline

hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar added projects: acl*sre-team, Gerrit.

Gerrit should already be using Java 7, hence the javaHome setting. The OpenJDK6 packages are probably just leftovers from before we swapped.

Can you please purge the java6 packages?

ytterbium:~$ dpkg --get-selections *openjdk-6*
openjdk-6-jre					install
openjdk-6-jre-headless				install
openjdk-6-jre-lib				install
ytterbium:~$ java -version
java version "1.6.0_35"

So:

sudo apt-get purge openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib

That should update the Debian alternatives to point to Java 7 and will be less confusing overall :-}

Thanks!

That won't work: There's a gerrit deb which depends on openjdk-6-jre

$ apt-cache show gerrit
Package: gerrit
Version: 2.7-rc2-507-g1e7090b-1
Architecture: all
Maintainer: Ryan Lane <rlane@wikimedia.org>
Installed-Size: 30316
Depends: openjdk-6-jre
Priority: extra
Section: net
Filename: pool/main/g/gerrit/gerrit_2.7-rc2-507-g1e7090b-1_all.deb
Size: 30956644
SHA256: c8454f33864bbd5a60fb007d425468f17162f5baced7c73d5ebd6e7995e01ca3
SHA1: a30ab2e6f7ff6c46dff567b8f7a6d7a1a62efd27
MD5sum: 00504ec200c270fd59a1c11f80a55645
Description: Gerrit code review system
$ dpkg -L gerrit
/.
/etc
/etc/init.d
/etc/init.d/gerrit
/etc/default
/etc/default/gerrit
/var
/var/lib
/var/lib/gerrit2
/var/lib/gerrit2/gerrit.war

We no more use that package for Gerrit cause it was a pain in the a**. Instead the .jar is build and uploaded directly to the machine.

The init script isn't in puppet. It attempts to source /etc/default/gerritcodereview which is provided by puppet.

I guess the package also takes care of creating the gerrit2 users. I have filled T103735: Get rid of the gerrit Debian package and migrate to puppet for that.

The Debian sources are in operations/debs/gerrit. We can change the dependency there and inject the .jar which is currently deployed. That will remove the openjdk-6 dependency.

fgiunchedi subscribed.
Paladox subscribed.

Declining since were moving to lead as the new gerrit host then I presume ytterbium will be decommissioned.