[Bug 1513529] Re: cloud images should be built with the same /etc/apt/sources.list as server images

Scott Moser smoser at ubuntu.com
Tue Mar 28 13:48:18 UTC 2017


This does not look fixed to me.

$ /tmp/check-backports.sh /tmp/apt-sources.d
==== precise =====
build_name: server
serial: 20170327
http://paste.ubuntu.com/24267929/
deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
==== trusty =====
build_name: server
serial: 20170323
http://paste.ubuntu.com/24267930/
deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
==== xenial =====
build_name: server
serial: 20170327
http://paste.ubuntu.com/24267932/
==== yakkety =====
build_name: server
serial: 20170327
http://paste.ubuntu.com/24267933/
## Also, please note that software in backports WILL NOT receive any review
deb http://archive.ubuntu.com/ubuntu/ yakkety-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ yakkety-backports main restricted universe multiverse
==== zesty =====
build_name: server
serial: 20170327
http://paste.ubuntu.com/24267934/
## Also, please note that software in backports WILL NOT receive any review
deb http://archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ zesty-backports main restricted universe multiverse
FAILED. missing backports: xenial


** Attachment added: "check-backports: script to show if backports is enabled in builtin image."
   https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1513529/+attachment/4848803/+files/check-backports.sh

** Tags removed: verification-needed
** Tags added: verification-failed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/1513529

Title:
  cloud images should be built with the same /etc/apt/sources.list as
  server images

Status in cloud-images:
  Fix Released
Status in livecd-rootfs package in Ubuntu:
  Fix Released
Status in livecd-rootfs source package in Xenial:
  Fix Committed

Bug description:
  [Impact]

  In systems created from cloud images where cloud-init does not run (or
  has not yet run), /etc/apt/sources.list does not have the same
  contents as it has in a server install.  This inconsistency can cause
  image modification/bootstrap to fail.

  [Test Case]

  Examine the cloud image built from livecd-rootfs, and confirm that the
  sources.list matches that in a server ISO install.

  [Regression Potential]

  Limited; the majority of cloud image usage does invoke cloud-init,
  which already writes out a source.list that matches the server ISO.
  This change aligns non-cloud-init usage to the existing norm.

  [Original Report]

  When we were poking around under bug 1177432 we found that
  /etc/apt/sources.list that is built into the image does not match that
  of an installed system.  This /etc/apt/sources.list is used if cloud-
  init did not re-write the file (such as woudl be used if you mounted
  the image directly and ran apt-get update).

  Example showing the problem:
  $ qemu-img create -f qcow2 -b wily/release-20151029/ubuntu-15.10-server-cloudimg-amd64-disk1.img /tmp/disk.img
  $ sudo mount-image-callback /tmp/disk.img --read-only chroot _MOUNTPOINT_ cat /etc/apt/sources.list
  deb http://archive.ubuntu.com/ubuntu/ wily main restricted universe multiverse
  deb http://archive.ubuntu.com/ubuntu/ wily-updates main restricted universe multiverse
  deb http://security.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse

  What we'd like to see here is exactly what we just added to cloud-init.
  For reference, as attached to bug 1177432, see trusty [1] and wily [2] examples.

  For reference, MAAS installed systems end up getting the built-in
  /etc/apt/sources.list with the ubuntu mirrors updated.  So this change
  after making it all the way through will result in maas images having
  the same list as ISO installed systems also.

  --
  [1] https://launchpadlibrarian.net/224142290/trusty-sources.list
  [2] https://launchpadlibrarian.net/224142308/wily-sources.list

  Related bugs:
   * bug 1177432  [SRU] Enable backports in cloud-init archive template

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1513529/+subscriptions



More information about the foundations-bugs mailing list