Update ubuntu cloud info

Bug #1724623 reported by Robert C Jennings
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
Fix Released
Medium
Unassigned
apport (Ubuntu)
Fix Released
Medium
Unassigned
Lunar
Won't Fix
Undecided
Unassigned
cloud-init (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned
Lunar
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]
Apport reported bug add invalid bug tags such as `uec-images` which no longer has meaning or `ec2-images` on openstack. Since cloud-init is installed in all these images and detects the correct datasource, leverage cloud-init's instance-data.json or cloud-id

[ Test Plan ]

1. Launch LXD container for each series
2. upgrade to cloud-init from -proposed.
3. Execute apport-bug cloud-init and view report to assess that correct tags are present for LXD datasource.
4. replace /run/cloud-init/instance-data.json cloud-id content with examples from openstack, ec2, configdrive and assert appropriate tags match the platform details.

verification scriptlet (attached):

#!/bin/bash
set -ex

cat > setup_proposed.sh <<EOF
#/bin/bash
mirror=http://archive.ubuntu.com/ubuntu
echo deb \$mirror \$(lsb_release -sc)-proposed main | tee /etc/apt/sources.list.d/proposed.list
apt-get update -q
apt-get install -qy cloud-init
EOF

cat > openstack.json <<EOF
{
  "ds" : {},
  "v1": {
        "cloud_id": "openstack",
        "cloud_name": "openstack",
        "machine": "CloudArchitecture",
        "platform": "openstack",
        "region": null,
        "subplatform": "metadata (http://169.254.169.254)"
  }
}
EOF

cat > ec2.json << EOF
{
  "ds": {
    "imageId": "ami-123",
    "instanceType": "m1.tiny",
    "region": "us-east-1"
  },
  "v1": {
    "cloud_name": "aws",
    "distro": "ubuntu",
    "distro_release": "jammy",
    "distro_version": "22.04",
    "instance_id": "i-06b5687b4d7b8595d",
    "machine": "x86_64",
    "platform": "ec2",
    "python_version": "3.10.4",
    "region": "us-east-2",
    "variant": "ubuntu"
  }
}
EOF

for release in focal jammy kinetic lunar; do
 VM=sru-$release
 lxc launch ubuntu-daily:$release $VM
 while ! lxc exec $VM -- cloud-init status --wait --long; do
    sleep 5
 done
 echo --- 1. Generate current apport report, selecting Openstack as cloud.
 echo --- step through prompts and select 'K' to keep report
 echo --- VERSION OF APPORT ---
 lxc exec $VM -- apport-bug --version
 lxc exec $VM -- apport-bug cloud-init
 APPORT_FILE=$(lxc exec $VM ls /tmp | grep apport)
 lxc file pull $VM/tmp/$APPORT_FILE apport-$VM.orig
 lxc exec $VM rm /tmp/$APPORT_FILE

 lxc file push setup_proposed.sh $VM/
 lxc exec $VM -- bash /setup_proposed.sh | grep cloud-init

 lxc file push openstack.json $VM/run/cloud-init/instance-data.json
 echo --- 2. Generate -proposed apport report which sources openstack instance-data.json, selecting Openstack as cloud.
 lxc exec $VM -- apport-bug cloud-init
 APPORT_FILE=$(lxc exec $VM ls /tmp | grep apport)
 lxc file pull $VM/tmp/$APPORT_FILE apport-$VM.openstack-proposed
 lxc exec $VM rm /tmp/$APPORT_FILE

 echo --- 3. Generate -proposed apport report which sources ec2 instance-data, selecting Ec2 as cloud.
 lxc file push ec2.json $VM/run/cloud-init/instance-data.json
 lxc exec $VM -- apport-bug cloud-init
 APPORT_FILE=$(lxc exec $VM ls /tmp | grep apport)
 lxc file pull $VM/tmp/$APPORT_FILE apport-$VM.ec2-proposed
 lxc exec $VM rm /tmp/$APPORT_FILE

 # redact logs lines for easy diffs
 for file in `ls apport*`; do
     sed -i '1,/logs.tgz/!d' $file
 done
 echo --- 4. Inspect diff tags of orig to openstack-proposed report
 diff -urN apport-$VM.orig apport-$VM.openstack-proposed || true
 echo --- 5. Inspect diff tags of openstack-proposed to ec2-proposed report
 diff -urN apport-$VM.openstack-proposed apport-$VM.ec2-proposed || true

done

[ Where problems could occur ]
apport-bug could traceback on poor logic preventing simple bug filing at apport CLI. It could omit tags if unable to process cloud-init/instance-data.json. nothing critical to daily performance, uptime or security

[ Other Info ]

[Original description]

Issues:
 - Using the presence of cloud-init to flag an image as a cloud image is incorrect now that ubuntu-server includes cloud-init (and ubuntu-core images)
 - Using the presence of EC2 metadata source is incorrect as many non-EC2 clouds provide EC2 metadata. Thus we have bugs like bug #1722946 that are tagged as an 'ec2-images' bug which are clearly on openstack
 - Marking all bugs that have cloud-init but no EC2 metadata source as an 'uec-images' bug uses a name that no longer has meaning.

Solution:
 - If cloud-init is present, check for /etc/cloud/build.info to indicate an Ubuntu cloud images, tag as 'cloud-images'. Pull the build_name and serial from that file into the bug comments.
 - If cloud-init is present, check for the presence of /run/cloud-init/cloud.cfg. Parse this yaml to determine the datasource type. Add the datasource used to the bug comment.

I have filed bug #1724626 to ask cloud-init development to surface more information from ds-identify to help ID the cloud so that we can better tag/annotate the bug. There may also be some info we can get to indicate the image ID on more clouds than just AWS. At a minimum I would like to see dsidentify make the EC2 platform it found available for consumers in cloud.cfg. This would allow us to identify AWS EC2 from look-alike datasources so that we can tag a bug as ec2-images for bug really on AWS and add EC2 specific fields to the description/attachments.

Robert C Jennings (rcj)
description: updated
Robert C Jennings (rcj)
tags: added: cloud-images
tags: added: id-59e78c0740facf10f025ddef
Revision history for this message
Scott Moser (smoser) wrote :

cloud-init can collect relevant logs with 'cloud-init collect-logs'

that is what we tell people to run (and what gets done with 'ubuntu-bug cloud-init').

I know that is not exactly what you're after.

tags: added: fr-266
Revision history for this message
Benjamin Drung (bdrung) wrote :

Can you provide some example /etc/cloud/build.info and /run/cloud-init/cloud.cfg files and expected output for them? Then I could write that code.

Revision history for this message
John Chittum (jchittum) wrote :

Attached is a possible patch to remedy some of the issues (and a few other bugs i've seen in the backlog with errors re: EC2 and other clouds). the gist:

1. change how we check if something is a cloud-image, generally
2. use /etc/cloud/build.info as a check if something is a Canonical cloud image
   2a. if it's rolled by someone else, hard to guarantee things
3. use /run/cloud-init/instance-data.json as a local store of info
   3a. this will run on most supported clouds, and provide more info

I've tried to make some graceful warning prints and error catches, along the lines of "if it's not there, just move on."

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "apport_cloud.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Benjamin Drung (bdrung) wrote :

Took some time to understand the diff until I noticed that the diff is inverse (apply with -R).

From my perspective add_cloud_init_data and get_ec2_data should be shipped by cloud-init, because they access data generated by cloud-init.

Which component is responsible for generating /etc/cloud/build.info?

Revision history for this message
John Chittum (jchittum) wrote :

> Which component is responsible for generating /etc/cloud/build.info?
livecd-rootfs, during image creation time.

https://git.launchpad.net/livecd-rootfs/tree/live-build/auto/build#n452

it'll have at least 1 value, serial (in the case of an OCI container), normally 2: serial, build_name

> From my perspective add_cloud_init_data and get_ec2_data should be shipped by cloud-init, because they access data generated by cloud-init.

I'll leave the cloud-init team to comment, but I actually disagree. `/run/cloud-init/instance-data.json` is one of several user parseable files generated by cloud-init. the "native" cloud-init error reporting would be to, as smoser said (back in 2018) is to do `cloud-init collect-logs`. That produces a tar file so it can't directly be added to the `apport` report. I'm not against shipping the cloud-init logs along with any cloud image based issue being reported. I'd have to dig in a little to see how `apport` currently creates a bundle, and how easy it'd be to add the cloud-init bundle as well. But know that we'll be delivering a _lot_ more information in the apport bug report.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Upstream merge request for parsing /etc/cloud/build.info: https://github.com/canonical/apport/pull/50

Please review https://github.com/canonical/apport/pull/50/commits/76e0f3475074a44fddd9e299489a1c32a811ba9d and let me know if you are happy with _BUILD_INFO_KEY_MAPPING or if there are better names.

Revision history for this message
James Falcon (falcojr) wrote :

"I'll leave the cloud-init team to comment, but I actually disagree."

Yeah, we already provide that info in a more raw state, and for cloud-init, it won't help to pretty it up or do more parsing. Is there something needed from cloud-init for this to work correctly?

Changed in cloud-init (Ubuntu):
status: New → Incomplete
Revision history for this message
Benjamin Drung (bdrung) wrote :
Changed in apport (Ubuntu):
importance: Undecided → Medium
Changed in apport:
milestone: none → 2.25.0
importance: Undecided → Medium
status: New → Fix Committed
Benjamin Drung (bdrung)
Changed in apport:
status: Fix Committed → Fix Released
Revision history for this message
Benjamin Drung (bdrung) wrote :

Apport 2.25.0-0ubuntu1 removed the buggy `add_cloud_info` from the ubuntu general hook. Here is the merge request for reading /run/cloud-init/instance-data.json (taken from jchittum's patch): https://github.com/canonical/cloud-init/pull/2020

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

This bug was fixed in the package apport - 2.26.0-0ubuntu2

---------------
apport (2.26.0-0ubuntu2) lunar; urgency=medium

  * fix: Mock query to Github in integration test

 -- Benjamin Drung <email address hidden> Fri, 24 Feb 2023 16:17:43 +0100

Changed in apport (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 23.1.1-0ubuntu2

---------------
cloud-init (23.1.1-0ubuntu2) lunar; urgency=medium

  * d/apport-general-hook.py: Add general apport hook to append cloud type,
    image and instance size information to bug reports (LP: #1724623)
  * d/cloud-init.postinst: MAAS prefer yaml.safe_load over yaml.load
    (LP: #2009746)
  * d/cloud-init.preinst: Oracle to remove vestigial /etc/cloud.cloud.cfg.d/
    99-disable-network-config.cfg because system config is now honored before
    datasource config (LP: #1956788)
  * Upstream snapshot based on upstream/main at 85b2fbc2.
    - Bugs fixed in this snapshot: (LP: #1956788)

 -- Chad Smith <email address hidden> Tue, 21 Mar 2023 14:43:55 -0600

Changed in cloud-init (Ubuntu):
status: Incomplete → Fix Released
Chad Smith (chad.smith)
description: updated
Chad Smith (chad.smith)
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Robert, or anyone else affected,

Accepted cloud-init into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.2-0ubuntu0~22.10.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.

Changed in cloud-init (Ubuntu Kinetic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in cloud-init (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Robert, or anyone else affected,

Accepted cloud-init into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.2-0ubuntu0~22.04.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-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 cloud-init (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Robert, or anyone else affected,

Accepted cloud-init into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.2-0ubuntu0~20.04.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-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.

Revision history for this message
Chad Smith (chad.smith) wrote :

Regression discovered for focal-proposed due to type annotations not being parsed on python 3.8. this resulted in tracebacks from python when importing cloud-init's apport/general-hooks module:

......ERROR: hook /usr/share/apport/general-hooks/cloud-init.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 226, in _run_hook
    exec(compile(fd.read(), hook, 'exec'), symb)
  File "/usr/share/apport/general-hooks/cloud-init.py", line 7, in <module>
    def _get_azure_data(ds_data) -> dict[str, str]:
TypeError: 'type' object is not subscriptable

tags: added: block-proposed-focal regression-proposed verification-failed-focal
removed: verification-needed-focal
Revision history for this message
Chad Smith (chad.smith) wrote :

Filed a bug tracking focal-proposed regression
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2025376

Revision history for this message
Chad Smith (chad.smith) wrote :

SRU Verification script

description: updated
Revision history for this message
Chad Smith (chad.smith) wrote :
Download full text (37.4 KiB)

SUCCESSFUL verification on Jammy, Kinetic and Lunar. No tracebacks, all expected CloudArchitecture, CloudName, CloudPlatform and CloudRegion are present when expected for openstack or ec2/aws. No missing apport report keys from orig to -proposed.

Long logs of test run below Jammy/Kinetic/Lunar:
$ bash ./sru-2025376-verification.sh
+ cat
+ cat
+ cat
+ for release in jammy kinetic lunar
+ VM=sru-jammy
+ lxc launch ubuntu-daily:jammy sru-jammy
Creating sru-jammy
Starting sru-jammy
+ lxc exec sru-jammy -- cloud-init status --wait --long
................................
status: done
boot_status_code: enabled-by-generator
last_update: Thu, 29 Jun 2023 19:44:00 +0000
detail:
DataSourceLXD
+ echo --- 1. Generate current apport report, selecting Openstack as cloud.
--- 1. Generate current apport report, selecting Openstack as cloud.
+ echo --- step through prompts and select K to keep report
--- step through prompts and select K to keep report
+ lxc exec sru-jammy -- apport-bug cloud-init

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
..
*** Your device details (lshw) may be useful to developers when addressing this bug, but gathering it requires admin privileges. Would you like to include this info?

What would you like to do? Your options are:
  Y: Yes
  N: No
  C: Cancel
Please choose (Y/N/C): n
.
*** Is this machine running in a cloud environment?

What would you like to do? Your options are:
  Y: Yes
  N: No
  C: Cancel
Please choose (Y/N/C): y

*** Please select the cloud vendor or environment in which this instance is running

Choices:
  1: AliYun
  2: AltCloud
  3: Amazon - Ec2
  4: Azure
  5: Bigstep
  6: Brightbox
  7: CloudSigma
  8: CloudStack
  9: DigitalOcean
  10: E24Cloud
  11: GCE - Google Compute Engine
  12: Huawei Cloud
  13: Exoscale
  14: Hetzner Cloud
  15: NWCS
  16: IBM - (aka SoftLayer or BlueMix)
  17: LXD
  18: MAAS
  19: NoCloud
  20: OpenNebula
  21: OpenStack
  22: Oracle
  23: OVF
  24: RbxCloud - (HyperOne, Rootbox, Rubikon)
  25: OpenTelekomCloud
  26: SAP Converged Cloud
  27: Scaleway
  28: SmartOS
  29: UpCloud
  30: VMware
  31: Vultr
  32: ZStack
  33: Outscale
  34: Other
  C: Cancel
Please choose (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/C): 21

*** Your user-data, cloud-config or autoinstall files can optionally be provided from /var/lib/cloud/instance/user-data.txt and could be useful to developers when addressing this bug. Do you wish to attach user-data to this bug?

What would you like to do? Your options are:
  Y: Yes
  N: No
  C: Cancel
Please choose (Y/N/C): y
...

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (66.5 KB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  I: Cancel and ignore future crashes of this program version
  C: Cancel
Please choose (S/V/K/I/C): k
Problem report file: /tmp/apport.cloud-init.5fl06mv5.apport
++ lxc exec ...

tags: added: verification-done-jammy verification-done-kinetic
removed: verification-needed-jammy verification-needed-kinetic
tags: added: verification-done-lunar
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Robert, or anyone else affected,

Accepted cloud-init into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.2.1-0ubuntu0~22.10.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.

tags: added: verification-needed-kinetic
removed: verification-done-kinetic
tags: added: verification-needed-jammy
removed: verification-done-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Robert, or anyone else affected,

Accepted cloud-init into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.2.1-0ubuntu0~22.04.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-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.

tags: added: verification-needed-focal
removed: verification-failed-focal
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Robert, or anyone else affected,

Accepted cloud-init into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.2.1-0ubuntu0~20.04.2 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.

Chad Smith (chad.smith)
Changed in cloud-init (Ubuntu Lunar):
status: New → Fix Committed
description: updated
Revision history for this message
Chad Smith (chad.smith) wrote :

SRU validation Focal, Jammy, Kinetic and Lunar successes.

Revision history for this message
Chad Smith (chad.smith) wrote :

SRU validation Focal, Jammy, Kinetic and Lunar successes.

Revision history for this message
Chad Smith (chad.smith) wrote :

SRU validation Focal, Jammy, Kinetic and Lunar successes.

tags: added: verification-done verification-done-focal verification-done-jammy verification-done-kinetic
removed: block-proposed-focal regression-proposed verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic
Revision history for this message
Chad Smith (chad.smith) wrote :
Download full text (33.7 KiB)

Updated test script asserting specific cloud-init version 23.2.1 as lunar was not installing from lunar-proposed by default without apt install -tlunar-proposed.

also changed test to specifically assert expected CloudName/PlatformSubplatform or Region and collect FAILED logs otherwise

Test verification results:
=====
csmith@midtown:~$ ./sru-1724623.sh
+ cat
+ cat
+ cat
+ rm -f failures
+ for release in focal jammy kinetic lunar
+ VM=sru-focal
+ lxc launch ubuntu-daily:focal sru-focal
Creating sru-focal
Starting sru-focal
+ lxc exec sru-focal -- cloud-init status --wait --long
................................
status: done
boot_status_code: enabled-by-generator
last_update: Thu, 13 Jul 2023 19:31:03 +0000
detail:
DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]
+ echo --- 1. Generate current apport report, selecting Openstack as cloud.
--- 1. Generate current apport report, selecting Openstack as cloud.
+ echo --- step through prompts and select K to keep report
--- step through prompts and select K to keep report
+ echo --- VERSION OF APPORT ---
--- VERSION OF APPORT ---
+ lxc exec sru-focal -- apport-bug --version
2.20.11
+ lxc exec sru-focal -- apport-bug cloud-init

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
......
*** Your device details (lshw) may be useful to developers when addressing this bug, but gathering it requires admin privileges. Would you like to include this info?

What would you like to do? Your options are:
  Y: Yes
  N: No
  C: Cancel
Please choose (Y/N/C): n

*** Is this machine running in a cloud environment?

What would you like to do? Your options are:
  Y: Yes
  N: No
  C: Cancel
Please choose (Y/N/C): y

*** Please select the cloud vendor or environment in which this instance is running

Choices:
  1: AliYun
  2: AltCloud
  3: Amazon - Ec2
  4: Azure
  5: Bigstep
  6: Brightbox
  7: CloudSigma
  8: CloudStack
  9: DigitalOcean
  10: E24Cloud
  11: GCE - Google Compute Engine
  12: Huawei Cloud
  13: Exoscale
  14: Hetzner Cloud
  15: NWCS
  16: IBM - (aka SoftLayer or BlueMix)
  17: LXD
  18: MAAS
  19: NoCloud
  20: OpenNebula
  21: OpenStack
  22: Oracle
  23: OVF
  24: RbxCloud - (HyperOne, Rootbox, Rubikon)
  25: OpenTelekomCloud
  26: SAP Converged Cloud
  27: Scaleway
  28: SmartOS
  29: UpCloud
  30: VMware
  31: Vultr
  32: ZStack
  33: Outscale
  34: Other
  C: Cancel
Please choose (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/C): 21

*** Your user-data, cloud-config or autoinstall files can optionally be provided from /var/lib/cloud/instance/user-data.txt and could be useful to developers when addressing this bug. Do you wish to attach user-data to this bug?

What would you like to do? Your options are:
  Y: Yes
  N: No
  C: Cancel
Please choose (Y/N/C): y
...

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (43.7 KB)
  V: View report
  K: Keep report file for s...

Changed in cloud-init (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Chad Smith (chad.smith) wrote :

While SRU verification did test lunar. I had forgotten the original release of 23.1 was already published to lunar containing the cloud-init changes for apport/general-hooks/cloud-init.py and apport/package-hooks/cloud-init.py that we are verifying here.

I've marked Lunar task as fix-released since 23.1 already contains this published fix. The verification script just stands to validate it works as advertised.

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

This bug was fixed in the package cloud-init - 23.2.1-0ubuntu0~22.10.1

---------------
cloud-init (23.2.1-0ubuntu0~22.10.1) kinetic; urgency=medium

  * Upstream snapshot based on 23.2.1. (LP: #2025180).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.2.1/ChangeLog

cloud-init (23.2-0ubuntu0~22.10.1) kinetic; urgency=medium

  * d/control: Remove pep8 dependency. It is no longer used.
  * d/apport-general-hook.py: Add general apport hook to append cloud type,
    image and instance size information to bug reports (LP: #1724623)
  * d/cloud-init.preinst: Oracle to remove vestigial /etc/cloud.cloud.cfg.d/
    99-disable-network-config.cfg because system config is now honored before
    datasource config (LP: #1956788)
  * d/cloud-init.preinst: Clean up vestigial
    /etc/cloud/cloud.cfg.d/99-disable-network-activation.cfg on GCE instances
    after fix in upstream google-guest-agent.
  * Upstream snapshot based on 23.2. (LP: #2023110).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.2/ChangeLog

 -- Brett Holman <email address hidden> Wed, 28 Jun 2023 14:24:21 -0600

Changed in cloud-init (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for cloud-init 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 cloud-init - 23.2.1-0ubuntu0~22.04.1

---------------
cloud-init (23.2.1-0ubuntu0~22.04.1) jammy; urgency=medium

  * Upstream snapshot based on 23.2.1. (LP: #2025180).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.2.1/ChangeLog

cloud-init (23.2-0ubuntu0~22.04.1) jammy; urgency=medium

  * d/control: Remove pep8 dependency. It is no longer used.
  * d/apport-general-hook.py: Add general apport hook to append cloud type,
    image and instance size information to bug reports (LP: #1724623)
  * d/cloud-init.preinst: Oracle to remove vestigial /etc/cloud.cloud.cfg.d/
    99-disable-network-config.cfg because system config is now honored before
    datasource config (LP: #1956788)
  * d/cloud-init.preinst: Clean up vestigial
    /etc/cloud/cloud.cfg.d/99-disable-network-activation.cfg on GCE instances
    after fix in upstream google-guest-agent.
  * Refresh patches against upstream/main
    - d/p/expire-on-hashed-users.patch
    - d/p/retain-netplan-world-readable.patch
  * Upstream snapshot based on 23.2. (LP: #2023110).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.2/ChangeLog

 -- Brett Holman <email address hidden> Wed, 28 Jun 2023 16:16:26 -0600

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

This bug was fixed in the package cloud-init - 23.2.1-0ubuntu0~20.04.2

---------------
cloud-init (23.2.1-0ubuntu0~20.04.2) focal; urgency=medium

  * d/apport-general-hook: correct type hints on Dict for py3.8
    (LP: #2025376)

cloud-init (23.2.1-0ubuntu0~20.04.1) focal; urgency=medium

  * Upstream snapshot based on 23.2.1. (LP: #2025180).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.2.1/ChangeLog

cloud-init (23.2-0ubuntu0~20.04.1) focal; urgency=medium

  * d/control: Remove pep8 dependency. It is no longer used
  * d/patches/netplan99-cannot-use-default.patch:
    - Retain routes' definitions compatible with netplan 0.99 (Fixes: #4133)
  * d/apport-general-hook.py: Add general apport hook to append cloud type,
    image and instance size information to bug reports (LP: #1724623)
  * d/cloud-init.preinst: Oracle to remove vestigial /etc/cloud.cloud.cfg.d/
    99-disable-network-config.cfg because system config is now honored before
    datasource config (LP: #1956788)
  * d/cloud-init.preinst: Clean up vestigial
    /etc/cloud/cloud.cfg.d/99-disable-network-activation.cfg on GCE instances
    after fix in upstream google-guest-agent.
  * Refresh patches against upstream/main:
    - d/p/expire-on-hashed-users.patch
    - d/p/retain-netplan-world-readable.patch
  * Upstream snapshot based on 23.2. (LP: #2023110).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.2/ChangeLog

 -- Chad Smith <email address hidden> Thu, 29 Jun 2023 09:41:13 -0600

Changed in cloud-init (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 23.04 (Lunar Lobster) has reached end of life, so this bug will not be fixed for that specific release.

Changed in apport (Ubuntu Lunar):
status: New → Won't Fix
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.