Populate .disk/info in ubuntu-image built images

Bug #1856684 reported by Łukasz Zemczak
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu CD Images
Fix Released
Undecided
Unassigned
Ubuntu Image
Fix Released
High
Łukasz Zemczak
livecd-rootfs (Ubuntu)
In Progress
Medium
Łukasz Zemczak
Bionic
Fix Released
High
Łukasz Zemczak
ubuntu-image (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

Our installer-based images (those touched by debian-cd) get a .disk/info file written on the rootfs that contains useful information such as the build timestamp. We do not have anything like that available for our u-i images, while for preinstalled images sometimes it is very important to know from which batch of images the given one comes.

We have decided that this will be very useful to have for our 18.04.4 images.

[Test Case]

For ubuntu-image changes:

Build a classic bionic image with something like:
ubuntu-image classic -d -p ubuntu-cpc -O out/ -s bionic --cloud-init user-data --disk-info disk-info-file path/to/gadget/prime
Boot up the image on kvm, check if /.disk/info is populated.

For all the changes:

Build a new classic bionic image via cdimage (raspi3 for instance). Boot it up (or mount it) and confirm that /.disk/info has the corresponding datestamp serial number in it.

[Regression Potential]

Besides classic images failing to build on cdimage, I don't think there's any other scenario I can think of. Any regression would most likely cause a build failure.

[Other SRU Info]

I am submitting a bionic ubuntu-image SRU without releasing the same changes for focal as I was originally planning to release this feature as part of 1.9. The exact same changes are landed in master, and will be released with 1.9 when it's ready, so there's certainty that it will not be missed. I didn't feel like doing another intermediate release for focal is strictly required - but I can do so if someone requires it.

Related branches

Changed in ubuntu-image:
status: New → In Progress
milestone: none → 1.9
assignee: nobody → Łukasz Zemczak (sil2100)
tags: added: id-5de55a9fab643c64680a854b
Changed in livecd-rootfs (Ubuntu):
status: New → In Progress
assignee: nobody → Łukasz Zemczak (sil2100)
Changed in livecd-rootfs (Ubuntu Bionic):
assignee: nobody → Łukasz Zemczak (sil2100)
Changed in livecd-rootfs (Ubuntu):
importance: Undecided → High
Changed in ubuntu-image:
importance: Undecided → High
Changed in livecd-rootfs (Ubuntu Bionic):
importance: Undecided → High
Changed in livecd-rootfs (Ubuntu):
importance: High → Medium
description: updated
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Łukasz, or anyone else affected,

Accepted ubuntu-image into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-image/1.8+18.04ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-image (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Łukasz, or anyone else affected,

Accepted livecd-rootfs into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.525.38 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in livecd-rootfs (Ubuntu Bionic):
status: New → Fix Committed
Changed in ubuntu-image (Ubuntu):
status: New → In Progress
Changed in ubuntu-image:
status: In Progress → Fix Committed
Changed in ubuntu-cdimage:
status: New → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Łukasz, or anyone else affected,

Accepted livecd-rootfs into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.525.39 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Brian Murray (brian-murray) wrote :

I mounted bionic-preinstalled-server-arm64+raspi3.img.xz and confirm that .disk/info exists.

 $ cat /media/bdmurray/writable/.disk/info
20200128-073319

Setting to verification-done.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Thank you for your verification Brian! Actually this helped me find a small bug in the feature - of course not in any of the packages here but in the cdimage part. Since .disk/info here should be only 20200128 to fit the image buildstamp. It should be now fixed though - let's make sure with the next build though.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubuntu-image has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.525.39

---------------
livecd-rootfs (2.525.39) bionic; urgency=medium

  * Ensure seed partition is mounted on no-cloud images which use system-boot
    as their seed (LP: #1860046)
  * Have getty wait for cloud-init to complete to ensure that the default
    user exists before presenting a login prompt

livecd-rootfs (2.525.38) bionic; urgency=medium

  * Support generating a .disk/info file via ubuntu-image from the passed-in
    datestamp parameter (using the $NOW environment variable). (LP: #1856684)
  * Switch raspi2-hwe-18.04-edge to raspi2-hwe-18.04. (LP: #1859478)

livecd-rootfs (2.525.37) bionic; urgency=medium

  * Use the raspi2-hwe-18.04-edge kernel flavour for the raspi3 images. This
    kernel is required for proper pi4 support. (LP: #1859478)

 -- Dave Jones <email address hidden> Fri, 24 Jan 2020 15:17:56 +0000

Changed in livecd-rootfs (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-image - 1.8+18.04ubuntu2

---------------
ubuntu-image (1.8+18.04ubuntu2) bionic; urgency=medium

  * Add support for populating a .disk/info file on the target image rootfs.
    (LP: #1856684)

 -- Łukasz 'sil2100' Zemczak <email address hidden> Tue, 21 Jan 2020 17:19:27 +0100

Changed in ubuntu-image (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-image - 1.9+20.04ubuntu1

---------------
ubuntu-image (1.9+20.04ubuntu1) focal; urgency=medium

  [ Łukasz 'sil2100' Zemczak ]
  * Add support for populating a .disk/info file on the target image rootfs.
    (LP: #1856684)
  * Design change: no longer remove /boot/grub from the rootfs for classic
    image builds. This allows developers to have more freedom on deciding how
    boot configuration should be handled. (LP: #1817050)
  * Fix the autopkgtest story on focal. Only for this series, remove the py37
    tox environment as it does not work due to pyparted being 3.8-only.

  [ Maciej Borzecki ]
  * ubuntu_image: update schema validator to allow gadget update specific
    keys & little cleanups. (LP: #1856903)

 -- Łukasz 'sil2100' Zemczak <email address hidden> Wed, 29 Jan 2020 16:33:36 +0100

Changed in ubuntu-image (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-image:
status: Fix Committed → Fix Released
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.