Page MenuHomePhabricator

Remove Java 6 from CI Jenkins slaves
Closed, ResolvedPublic

Description

There should be no more need for Java 6 on the Jenkins slaves. We should get rid of it on all slaves:

  • update puppet manifest to no more install openjdk-6-* https://gerrit.wikimedia.org/r/220098
  • verify Jenkins Java configuration for jobs
    • Global default JVM -- Uses java from PATH
    • Maven jobs and others (JVM version might be hardcoded in JJB) -- Use either Default or JDK 7
  • verify Jenkins slaves are started with java 7 -- switched the Precise ones by disconnecting/reconnecting
  • purge java 6 (puppet ensure => absent ?) -- purged manually
  • make sure Java related utilities are using Java 7 (jmap etc).

Event Timeline

hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar added subscribers: Aklapper, MoritzMuehlenhoff, hashar.

Here are the Jenkins jobs JDK from ssh gallium.wikimedia.org grep jdk /var/lib/jenkins/jobs/*/config.xml

Job nameJenkins XML config
analytics-libanon<jdk>(Default)</jdk>
analytics-libcidr<jdk>(Default)</jdk>
analytics-limn<jdk>(Default)</jdk>
analytics-reportcard-data<jdk>(Default)</jdk>
analytics-udp-filters<jdk>(Default)</jdk>
analytics-webstatscollector<jdk>(Default)</jdk>
analytics-wikistats<jdk>(Default)</jdk>
browsertests-UploadWizard-en.wikipedia.beta.wmflabs.org-windows_7-internet_explorer-8-sauce<jdk>(Default)</jdk>
browsertests-Wikidata-WikidataTests-linux-chrome-sauce<jdk>(Default)</jdk>
browsertests-Wikidata-WikidataTests-linux-chrome-sauce-DEBUG<jdk>(Default)</jdk>
browsertests-Wikidata-WikidataTests-linux-firefox-sauce-DEBUG<jdk>(Default)</jdk>
Global-Dev Dashboard Data<jdk>(Default)</jdk>
hashar-mediawiki-core-doxygen-publish<jdk>(Default)</jdk>
hashar-nodepool-job<jdk>(Default)</jdk>
hashar-test-all-extensions<jdk>(Default)</jdk>
hashar-test-gradle<jdk>(Default)</jdk>
hashar-test-publisher-workspace-cleaner<jdk>(Default)</jdk>
npm<jdk>(Default)</jdk>
operations-puppet-catalog-compiler<jdk>(Default)</jdk>
operations-puppet-tox-data_admin_lint<jdk>(Default)</jdk>
search-extra<jdk>Ubuntu - OpenJdk 7</jdk>
search-extra-javadoc<jdk>Ubuntu - OpenJdk 7</jdk>
search-extra-javadoc-publish<jdk>Ubuntu - OpenJdk 7</jdk>
search-highlighter<jdk>Ubuntu - OpenJdk 7</jdk>
search-repository-swift<jdk>Ubuntu - OpenJdk 7</jdk>
test-csteipp-sensiolabs-securityadvisorieschecker<jdk>(Default)</jdk>
test-hashar-zuul-debian-package<jdk>(Default)</jdk>
test-T62720-android-emulator<jdk>(Default)</jdk>
wikidata-gremlin<jdk>Ubuntu - OpenJdk 7</jdk>
wikidata-query-rdf<jdk>Ubuntu - OpenJdk 7</jdk>
wikimedia-fundraising-civicrm-devhand<jdk>(Default)</jdk>

The Jenkins main configuration file has:

<jdks>
  <jdk>
    <name>Ubuntu - OpenJdk 6</name>
    <home>/usr/lib/jvm/java-6-openjdk-amd64/</home>
    <properties/>
  </jdk>
  <jdk>
    <name>Ubuntu - OpenJdk 7</name>
    <home>/usr/lib/jvm/java-7-openjdk-amd64/</home>
    <properties/>
  </jdk>
  <jdk>
    <name>Ubuntu - OpenJdk 8</name>
    <home>/usr/lib/jvm/java-8-openjdk-amd64</home>
    <properties/>
  </jdk>
</jdks>

For the slaves agents some are hardcoded with <javaPath>/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java</javaPath>, others have the default. I guess getting rid of java 6 and reconnecting them will migrate to java 7.

The default Java is the one found in PATH for the Jenkins user running the job (jenkins-slave on production slaves and jenkins-deploy on labs slaves) or whatever is set via Debian alternative.

User@hostjava -version
jenkins-slave@gallium1.7
jenkins-slave@lanthanum1.6

On labs slaves via integration-saltmaster and salt '*slave*' cmd.run '/usr/bin/sudo -u jenkins-slave java -version':

Instancejava -version
integration-lightslave-jessie-1002.integration.eqiad.wmflabs"1.7.0_79"
integration-slave-jessie-1001.integration.eqiad.wmflabs"1.7.0_79"
integration-slave-precise-1011.integration.eqiad.wmflabs"1.6.0_35"
integration-slave-precise-1012.integration.eqiad.wmflabs"1.6.0_35"
integration-slave-precise-1013.integration.eqiad.wmflabs"1.6.0_35"
integration-slave-precise-1014.integration.eqiad.wmflabs"1.6.0_35"
integration-slave-trusty-1011.integration.eqiad.wmflabs"1.7.0_79"
integration-slave-trusty-1012.integration.eqiad.wmflabs"1.7.0_79"
integration-slave-trusty-1013.integration.eqiad.wmflabs"1.7.0_79"
integration-slave-trusty-1014.integration.eqiad.wmflabs"1.7.0_79"
integration-slave-trusty-1015.integration.eqiad.wmflabs"1.7.0_79"
integration-slave-trusty-1016.integration.eqiad.wmflabs"1.7.0_79"
integration-slave-trusty-1017.integration.eqiad.wmflabs"1.7.0_79"
integration-slave-trusty-1021.integration.eqiad.wmflabs"1.7.0_79"

So the Precise CI slaves have the wrong version.

Change 220098 had a related patch set uploaded (by Hashar):
contint: no more install openjdk-6

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

Change 220098 merged by Muehlenhoff:
contint: no more install openjdk-6

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

hashar set Security to None.

Purged the packages from gallium and lanthanum. Same for labs machines with:

salt '*' cmd.run 'apt-get remove --yes --purge openjdk-6-jre-lib openjdk-6-jre-headless openjdk-6-jre openjdk-6-jdk'

In Jenkins I have removed the JavaPath setting from the slaves lanthanum, integration-slave-jessie-1001 and integration-lightslave-jessie-1002.

Disconnected / reconnected Precise slaves so they catch up with the java version in PATH. salt '*slave*' cmd.run '/usr/bin/sudo -u jenkins-slave java -version' reports all slaves uses java 7.

Dropped the Jenkins JDK configuration for Ubuntu - OpenJdk 6.

Java alternatives on labs instances no more shows java6:

salt '*' cmd.run 'ls -l /etc/alternatives/j*|grep java-6'
i-0000063a.eqiad.wmflabs:
integration-t102108-jessie-new2.integration.eqiad.wmflabs:
integration-slave-precise-1013.integration.eqiad.wmflabs:
integration-slave-jessie-1001.integration.eqiad.wmflabs:
integration-slave-trusty-1017.integration.eqiad.wmflabs:
integration-vmbuilder-trusty.integration.eqiad.wmflabs:
integration-slave-trusty-1016.integration.eqiad.wmflabs:
integration-labsvagrant.integration.eqiad.wmflabs:
integration-t102108-trusty-new2.integration.eqiad.wmflabs:
integration-slave-precise-1011.integration.eqiad.wmflabs:
integration-puppetmaster.integration.eqiad.wmflabs:
    ls: cannot access /etc/alternatives/j*: No such file or directory
integration-saltmaster.integration.eqiad.wmflabs:
    ls: cannot access /etc/alternatives/j*: No such file or directory
integration-slave-trusty-1014.integration.eqiad.wmflabs:
integration-slave-trusty-1013.integration.eqiad.wmflabs:
integration-lightslave-jessie-1002.integration.eqiad.wmflabs:
integration-slave-trusty-1011.integration.eqiad.wmflabs:
integration-zuul-server.integration.eqiad.wmflabs:
integration-slave-precise-1012.integration.eqiad.wmflabs:
integration-slave-trusty-1012.integration.eqiad.wmflabs:
integration-publisher.integration.eqiad.wmflabs:
    ls: cannot access /etc/alternatives/j*: No such file or directory
integration-slave-precise-1014.integration.eqiad.wmflabs:
integration-raita.integration.eqiad.wmflabs:
integration-slave-trusty-1021.integration.eqiad.wmflabs:
integration-slave-trusty-1015.integration.eqiad.wmflabs:

gallium and lanthanum still shows javaws which is provided by package icedtea-netx NetX - implementation of the Java Network Launching Protocol (JNLP). We have icedtea-7-jre-jamvm which provides the same hence:

apt-get purge icedtea-netx-common icedtea-netx
hashar claimed this task.
hashar updated the task description. (Show Details)

Java 6 is gone. Thank you @MoritzMuehlenhoff !