Adding metadata file into OCI images

Bug #1998229 reported by Samir Akarioh
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

* The existing Ubuntu container images are being built and published
without any metadata information. This will introduce a new cloud-like
path and metadata file, including the image's serial number within
(which is useful for users to pinpoint a specific revision of the image).

[ Test Plan ]

* Run (for any of the affected series):

   $ docker run public.ecr.aws/ubuntu/ubuntu:jammy grep serial /etc/cloud/build.info || echo "Image metadata not found"

* Currently, the output will be

   grep: /etc/cloud/build.info: No such file or directory
   Image metadata not found

* After the release, I'll trigger the Ubuntu container image
CI/CD pipelines, and re-run the Docker command from above.

* The output shall then be similar to:

   serial: 20221125

[ Where problems could occur ]

Given that we're adding new content to the filesystem, there's little
room for regression. A potential pitfall could be the future introduction
of /etc/cloud/(...) into the minimal filesystem, which would then
potentially end up being altered.

[ Other Info ]

Here the PR I have made :

https://code.launchpad.net/~samirakarioh/livecd-rootfs/+git/livecd-rootfs/+merge/433431
https://code.launchpad.net/~samirakarioh/livecd-rootfs/+git/livecd-rootfs/+merge/433432
https://code.launchpad.net/~samirakarioh/livecd-rootfs/+git/livecd-rootfs/+merge/433433
https://code.launchpad.net/~samirakarioh/livecd-rootfs/+git/livecd-rootfs/+merge/433572

Utkarsh Gupta (utkarsh)
tags: removed: bionic focal jammy kinetic
Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
Revision history for this message
Samir Akarioh (samirakarioh) wrote :

Here the debdiff for kinetic

Revision history for this message
Samir Akarioh (samirakarioh) wrote :

Here the debdiff for jammy

Revision history for this message
Samir Akarioh (samirakarioh) wrote :

Here the debdiff for focal

Revision history for this message
Samir Akarioh (samirakarioh) wrote :

Here the debdiff for bionic

Revision history for this message
Samir Akarioh (samirakarioh) wrote :

This bug also affect bionic

description: updated
description: updated
Revision history for this message
Cristovao Cordeiro (cjdc) wrote :

Hi, could we get this SRU reviewed please ;)

Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Sponsored the uploads. Thanks.

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

It be helpful if the "add_cloud_info" function in the general apport hook for Ubuntu were updated to collect this serial information and add it to bug reports. I believe there is a bug and or JIRA card about updating the hook (as its quite old) which is a part of the apport package and can be found on an installed system in /usr/share/apport/general-hooks/ubuntu.py.

Changed in livecd-rootfs (Ubuntu Kinetic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Samir, or anyone else affected,

Accepted livecd-rootfs into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.791.1 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, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. 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 :
Changed in livecd-rootfs (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Samir, or anyone else affected,

Accepted livecd-rootfs into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.765.14 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, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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 Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Samir, or anyone else affected,

Accepted livecd-rootfs into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.664.45 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Samir, 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.61 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, what testing has been performed on the package 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
Cristovao Cordeiro (cjdc) wrote (last edit ):

Thanks Brian. Samir is OOO so I'll cover the verification steps.

The test plan from this bug's summary is only applicable when this package is released into -
updates.
So here's my current test plan to verify the -proposed pocket:

1. git clone https://github.com/ubuntu-bartenders/ubuntu-old-fashioned
2. cd ubuntu-old-fashioned/scripts/ubuntu- bartender
3.
    for SERIES in bionic focal jammy kinetic
    do
        ./ubuntu-bartender --build-provider multipass \
            --livecd-rootfs-repo https://git.launchpad.net/ubuntu/+source/livecd-rootfs \
            --livecd-rootfs-branch ubuntu/$SERIES-proposed -- --project ubuntu-oci --series $SERIES
    done

Each of the above bartender calls will produce a tarball with a different random name. Let's say
(for the sake of readability in this test plan) that those are "$SERIES-ubuntu-on-the-rocks.tar.gz":

4.
    for SERIES in bionic focal jammy kinetic
    do
      mkdir $SERIES-build
      tar -xf $SERIES-ubuntu-on-the-rocks.tar.gz -C $SERIES-build
      sudo mount $SERIES-build/build.output/livecd.ubuntu-oci.ext4 /mnt
      grep serial /mnt/etc/cloud/build. info
      sudo umount /mnt
    done

I've tested this, and I could see the /etc/cloud/build.info file (with the "serial" content) on
bionic, focal, jammy and kinetic.
This fixes the bug for me.

Thanks!
P.S> I don't think I have the right to "change the tag from verification-needed-bionic to verification-done-bionic".

tags: added: verification-done-bionic verification-done-focal verification-done-jammy verification-done-kinetic
removed: verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  [ Samir Akarioh ]
  * feat: Add metadata on ubuntu-oci image. (LP: #1998229)

 -- Utkarsh Gupta <email address hidden> Mon, 12 Dec 2022 15:36:15 +0530

Changed in livecd-rootfs (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for livecd-rootfs 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.664.45

---------------
livecd-rootfs (2.664.45) focal; urgency=medium

  [ Samir Akarioh ]
  * feat: Add metadata on ubuntu-oci image. (LP: #1998229)

 -- Utkarsh Gupta <email address hidden> Mon, 12 Dec 2022 15:33:48 +0530

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

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

---------------
livecd-rootfs (2.765.14) jammy; urgency=medium

  [ Samir Akarioh ]
  * feat: Add metadata on ubuntu-oci image. (LP: #1998229)

 -- Utkarsh Gupta <email address hidden> Mon, 12 Dec 2022 15:30:56 +0530

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

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

---------------
livecd-rootfs (2.791.1) kinetic; urgency=medium

  [ Samir Akarioh ]
  * feat: Add metadata on ubuntu-oci image. (LP: #1998229)

 -- Utkarsh Gupta <email address hidden> Fri, 09 Dec 2022 21:19:45 +0530

Changed in livecd-rootfs (Ubuntu Kinetic):
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.