Page MenuHomePhabricator

Nodepool instances have duplicate entry for jessie-backports/main
Closed, ResolvedPublic

Description

apt complains with:

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)

A grep in /etc/ yields:

/etc/apt/sources.list:deb http://mirrors.wikimedia.org/debian/ jessie-backports main
/etc/apt/sources.list.d/debian-backports.list:deb  http://mirrors.wikimedia.org/debian/ jessie-backports main contrib non-free
/etc/apt/sources.list.d/debian-backports.list:deb-src http://mirrors.wikimedia.org/debian/ jessie-backports main contrib non-free

From /dib/puppet/ciiimage.pp we use include ::apt which does:

# enable backports for Debian systems
if $::operatingsystem == 'Debian' {
    apt::repository { 'debian-backports':
        uri         => 'http://mirrors.wikimedia.org/debian',
        dist        => "${::lsbdistcodename}-backports",
        components  => 'main non-free contrib',
        comment_old => true,
    }
}

I am not sure how we end up having it as well in /etc/apt/sources.list

Event Timeline

hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar subscribed.
hashar claimed this task.

Same repository, not the same components and thus apt reject both:

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

Turns out I forgot I have filled this bug and ended up fixing it via T126246: Provision openjdk-7-jre-headless on Nodepool slaves.

Although T126246 has much of the information, lets reuse this bug to clean up the solution I found.

Related bugs were T126230 and T126246

The fix is https://gerrit.wikimedia.org/r/#/c/270433/ 1d667fb6ccb24c83abc7dfcdecd2a52eae2c9ae6 . That pass to the dib delian-minimal element 'main,contrib,non-free' to forge the /etc/apt/sources.list.

So we now:

export DIB_DEBIAN_COMPONENTS='main,contrib,non-free'

The fix I proposed upstream has been merged https://review.openstack.org/#/c/279821/ . Have to update our documentation I guess.

hashar triaged this task as Medium priority.Mar 14 2016, 7:42 PM
hashar moved this task from In-progress to Done on the Continuous-Integration-Scaling board.
hashar moved this task from Backlog to Patch merged upstream on the Upstream board.

https://review.openstack.org/#/c/279821/ got merged and is included in diskimage-builder as of 1.12.0. Have to rebuild an image with that version or a later one and confirm it works all fine then we can get this task closed.

Change 270873 abandoned by Hashar:
dib: only use 'main' Debian component

Reason:
Got fixed with dib 1.12.0 and us doing:

export DIB_DEBIAN_COMPONENTS='main,contrib,non-free'

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

Change 270872 had a related patch set (by Hashar) published:
apt: make components parameterizable

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

Change 270872 abandoned by Hashar:
apt: make components parameterizable

Reason:
No more needed.

Got fixed with dib 1.12.0 and us doing:

export DIB_DEBIAN_COMPONENTS='main,contrib,non-free'

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

Works fine now since dib 1.12.0 and setting DIB_DEBIAN_COMPONENTS='main,contrib,non-free'