Page MenuHomePhabricator

Provision openjdk-7-jre-headless on Nodepool slaves
Closed, ResolvedPublic

Description

The Nodepool image lacks a Java installation. Jenkins provision it by itself after it managed to ssh to the CI slave.

We would need to have the package openjdk-7-jre-headless installed, that will in turn let other jobs use java.

Related Objects

Event Timeline

hashar claimed this task.
hashar raised the priority of this task from to High.
hashar updated the task description. (Show Details)
hashar added subscribers: gerritbot, JanZerebecki, hashar and 5 others.

The apt configuration is broken on Nodepool instances, most probably because of duplicate definitions:

The disk image builder provides /etc/apt/sources.list with:

deb http://mirrors.wikimedia.org/debian/ jessie main
deb http://mirrors.wikimedia.org/debian/ jessie-backports main

Puppet ::apt class ships /etc/apt/sources.list.d/debian-backports.list :

deb http://mirrors.wikimedia.org/debian/ jessie-backports main contrib non-free
deb-src http://mirrors.wikimedia.org/debian/ jessie-backports main contrib non-free

Thus jessie-backports is duplicated with conflicting components:

- main
+ main contrib non-free

The list of components is hardcoded both in diskimage-builder and in our apt puppet class :-/

AFAIK, duplicates are considered only as warnings and do not influence the update/upgrade path.

hashar renamed this task from Provision openjdk-8-jre-headless on Nodepool slaves to Provision openjdk-7-jre-headless on Nodepool slaves.Feb 12 2016, 11:13 AM
hashar updated the task description. (Show Details)
hashar set Security to None.

The instance I used to build image is gone (T126613) :-(

The exact message is:

$ apt-cache policy openjdk-7-jre-headless
W: Duplicate sources.list entry http://mirrors.wikimedia.org/debian/ jessie-backports/main amd64 Packages (/var/lib/apt/lists/mirrors.wikimedia.org_debian_dists_jessie-backports_main_binary-amd64_Packages)
W: You may want to run apt-get update to correct these problems
N: Unable to locate package openjdk-7-jre-headless

Change 270433 had a related patch set uploaded (by Hashar):
dib: add non-free, contribs components

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

Better:

$ virt-cat -a image-jessie-20160212T225848Z.qcow2 /etc/apt/sources.list
deb http://mirrors.wikimedia.org/debian/ jessie main non-free contrib
deb http://mirrors.wikimedia.org/debian/ jessie-backports main non-free contrib
$ virt-cat -a image-jessie-20160212T225848Z.qcow2 /etc/apt/sources.list.d/debian-backports.list
deb http://mirrors.wikimedia.org/debian/ jessie-backports main contrib non-free
deb-src http://mirrors.wikimedia.org/debian/ jessie-backports main contrib non-free
$ virt-cat -a image-jessie-20160212T225848Z.qcow2 /etc/apt/sources.list.d/wikimedia.list
deb http://apt.wikimedia.org/wikimedia jessie-wikimedia main backports thirdparty
deb-src http://apt.wikimedia.org/wikimedia jessie-wikimedia main backports thirdparty

Gotta fix the order of components just in case. will do in https://gerrit.wikimedia.org/r/270433

Note that deb http://mirrors.wikimedia.org/debian/ jessie-backports main contrib non-free appears twice, once in /etc/apt/sources.list and another in /etc/apt/sources.list.d/debian-backports.list

Hooked in the image I build via:

$ virt-rescue -a image-jessie-20160212T225848Z.qcow2 
<linux boot>
$ mount /dev/sda1 /sysroot/
$ chroot /sysroot/

From there:

apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
1001 http://apt.wikimedia.org/wikimedia/ jessie-wikimedia/thirdparty amd64 Packages
     release v=8,o=Wikimedia,a=jessie-wikimedia,n=jessie-wikimedia,l=Wikimedia,c=thirdparty
     origin apt.wikimedia.org
1001 http://apt.wikimedia.org/wikimedia/ jessie-wikimedia/backports amd64 Packages
     release v=8,o=Wikimedia,a=jessie-wikimedia,n=jessie-wikimedia,l=Wikimedia,c=backports
     origin apt.wikimedia.org
1001 http://apt.wikimedia.org/wikimedia/ jessie-wikimedia/main amd64 Packages
     release v=8,o=Wikimedia,a=jessie-wikimedia,n=jessie-wikimedia,l=Wikimedia,c=main
     origin apt.wikimedia.org
 100 http://mirrors.wikimedia.org/debian/ jessie-backports/contrib amd64 Packages
     release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=contrib
     origin mirrors.wikimedia.org
 100 http://mirrors.wikimedia.org/debian/ jessie-backports/non-free amd64 Packages
     release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=non-free
     origin mirrors.wikimedia.org
 100 http://mirrors.wikimedia.org/debian/ jessie-backports/main amd64 Packages
     release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports,c=main
     origin mirrors.wikimedia.org
 500 http://mirrors.wikimedia.org/debian/ jessie/contrib amd64 Packages
     release v=8.3,o=Debian,a=stable,n=jessie,l=Debian,c=contrib
     origin mirrors.wikimedia.org
 500 http://mirrors.wikimedia.org/debian/ jessie/non-free amd64 Packages
     release v=8.3,o=Debian,a=stable,n=jessie,l=Debian,c=non-free
     origin mirrors.wikimedia.org
 500 http://mirrors.wikimedia.org/debian/ jessie/main amd64 Packages
     release v=8.3,o=Debian,a=stable,n=jessie,l=Debian,c=main
     origin mirrors.wikimedia.org
Pinned packages:
W: Duplicate sources.list entry http://mirrors.wikimedia.org/debian/ jessie-backports/main amd64 Packages (/var/lib/apt/lists/mirrors.wikimedia.org_debian_dists_jessie-backports_main_binary-amd64_Packages)
W: Duplicate sources.list entry http://mirrors.wikimedia.org/debian/ jessie-backports/contrib amd64 Packages (/var/lib/apt/lists/mirrors.wikimedia.org_debian_dists_jessie-backports_contrib_binary-amd64_Packages)
W: Duplicate sources.list entry http://mirrors.wikimedia.org/debian/ jessie-backports/non-free amd64 Packages (/var/lib/apt/lists/mirrors.wikimedia.org_debian_dists_jessie-backports_non-free_binary-amd64_Packages)
W: You may want to run apt-get update to correct these problems

Still dupes but:

apt-cache madison openjdk-7-jre-headless pkg-config

openjdk-7-jre-headless7u91-2.6.3-1~deb8u1http://mirrors.wikimedia.org/debian/ jessie/main amd64 Packages
pkg-config0.28-1http://mirrors.wikimedia.org/debian/ jessie/main amd64 Packages

Change 270703 had a related patch set uploaded (by Hashar):
dib: provision openJDK

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

Mentioned in SAL [2016-02-15T10:57:49Z] <hashar> bumped Nodepool disk image to fix apt configuration / include jre and package-config. Refreshing snapshot image. Poke T126246 T126230 T119143

Jenkins manage to find java now:

[02/15/16 11:08:48] [SSH] Checking java version of java
[02/15/16 11:08:48] [SSH] java -version returned 1.7.0_91.

Change 270703 merged by jenkins-bot:
dib: provision openJDK

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

Will follow up / clean the configuration for the APT repository via T120963