extra kernel installed in ubuntu-minimal

Bug #1637516 reported by Gregory Haynes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
High
Ian Wienand

Bug Description

When making an ubuntu-minimal image typically you end up with two kernels installed. This wastes a significant amount of on disk space.

This happens because debootstrap does not support multiple repositories, and we add in the updates repository afterwards. As a result when upgrade is run during the build a new kernel is almost always found and then installed. Autoremove is unable to remove the original kernel because it is using the kernel version of the build host which ran dib.

Changed in diskimage-builder:
status: New → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/392253

Changed in diskimage-builder:
assignee: nobody → Gregory Haynes (greghaynes)
status: Triaged → In Progress
Changed in diskimage-builder:
assignee: Gregory Haynes (greghaynes) → Ian Wienand (iwienand)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/392253
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=45df304d488a0309fb981a4964238b81a370c358
Submitter: Jenkins
Branch: master

commit 45df304d488a0309fb981a4964238b81a370c358
Author: Gregory Haynes <email address hidden>
Date: Tue Nov 1 10:38:20 2016 -0700

    Perform package install outside of debootstrap

    Debootstrap only supports one apt repository to install packages from.
    As a result, we do not consider the updates repo during debootstrap
    causing us install a second kernel when we do an apt-get dist-upgrade
    during build.

    Lets use debootstrap to get us a minimal chroot, then add our repos and
    install the correct packages from the start.

    We also have to reorder the dpkg root.d scripts which configure apt so
    they run before we perform our package installs.

    Change-Id: I6a592db6f0a01d3b19d8e0786e63f1315a1ef647
    Closes-Bug: #1637516

Changed in diskimage-builder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/424988

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on diskimage-builder (master)

Change abandoned by Ian Wienand (<email address hidden>) on branch: master
Review: https://review.openstack.org/424988
Reason: wrong branch

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (feature/v2)

Fix proposed to branch: feature/v2
Review: https://review.openstack.org/424989

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: feature/v2
Review: https://review.openstack.org/426987

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on diskimage-builder (feature/v2)

Change abandoned by Ian Wienand (<email address hidden>) on branch: feature/v2
Review: https://review.openstack.org/424989
Reason: i'm going to try this in smaller increments

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (feature/v2)
Download full text (4.1 KiB)

Reviewed: https://review.openstack.org/426987
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=b6e631360f78833c70d3c6e3d91d507554524a81
Submitter: Jenkins
Branch: feature/v2

commit 45df304d488a0309fb981a4964238b81a370c358
Author: Gregory Haynes <email address hidden>
Date: Tue Nov 1 10:38:20 2016 -0700

    Perform package install outside of debootstrap

    Debootstrap only supports one apt repository to install packages from.
    As a result, we do not consider the updates repo during debootstrap
    causing us install a second kernel when we do an apt-get dist-upgrade
    during build.

    Lets use debootstrap to get us a minimal chroot, then add our repos and
    install the correct packages from the start.

    We also have to reorder the dpkg root.d scripts which configure apt so
    they run before we perform our package installs.

    Change-Id: I6a592db6f0a01d3b19d8e0786e63f1315a1ef647
    Closes-Bug: #1637516

commit 22952b7ea0543bb4f446752976d1d8ba232b021a
Author: Paul Belanger <email address hidden>
Date: Mon Nov 21 10:15:09 2016 -0500

    Improve checksum performance for images

    Do md5 and sha256 in parallel to speed things up for larger images.

    Change-Id: Ib782fe54e4286ba2749a7ab7247f5d41a887a370
    Signed-off-by: Paul Belanger <email address hidden>

commit 35e878b6d9b7d7ba9414a12058250f420d11c139
Author: Markos Chandras <email address hidden>
Date: Tue Nov 29 16:09:40 2016 +0000

    elements: zypper-minimal: Add ca-certificates-mozilla package

    It's important to have the CA certificates on the target for ssl
    crypto apps to work. Plus it's also important during bootstrapping
    with diskimage-builder as tools like 'pip' etc need the certificates
    in place in order to work properly. This fixes opensuse-minimal
    image generation with the 'simple-init' element which was causing the
    following error:

    Download error on https://pypi.python.org/simple/: [SSL:
    CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

    Change-Id: Ie94cd3556f8ae523f60ce0155ba18ed752e6fbb6

commit bc6be8542417dee4d20b12685106c0ce46ec2fb3
Author: Ian Wienand <email address hidden>
Date: Wed Nov 23 14:09:44 2016 +1100

    Trace package install in package-installs-v2

    When running the package install, trace the output so we can see what
    packages were installed.

    Change-Id: I5442f544ff0ef3ddffdbe6b898d178548d699a41

commit d84df6034522c1bcbc56fc5faff29dc548d58402
Author: Markos Chandras <email address hidden>
Date: Thu Oct 20 18:53:30 2016 +0100

    elements: pip-and-virtualenv: Add python-xml dependency

    SUSE packages the 'xml' python module as a separate package so make
    sure it's pulled in before we attempt to install the pip module
    since the latter depends on it. Fixes the following problem when
    building with the opensuse-minimal and pip-and-virtualenv elements:

    Traceback (most recent call last):
      File "/tmp/get-pip.py", line 19177, in <module>
        main()
      File "/tmp/get-pip.py", line 194, in main
        bootstrap(tmpdir=tmpdir)
      File "/tmp/get-pip.py", line 8...

Read more...

tags: added: in-feature-v2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.