Activity log for bug #2025376

Date Who What changed Old value New value Message
2023-06-29 15:00:56 Chad Smith bug added bug
2023-06-29 15:02:21 Chad Smith nominated for series Ubuntu Focal
2023-06-29 15:02:21 Chad Smith bug task added cloud-init (Ubuntu Focal)
2023-06-29 16:07:47 Chad Smith cloud-init (Ubuntu): status Triaged Fix Committed
2023-06-29 19:29:57 Chad Smith attachment added sru-2025376-verification.sh https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2025376/+attachment/5682925/+files/sru-2025376-verification.sh
2023-06-29 19:39:48 Chad Smith description SRU verification regression found during testing of https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1724623. cloud-init 23.2 introduced a couple new functions to extract cloud-specific values automatically for apport bug reports in apport/general-hooks/cloud_init.py. The functions _get_azure_data and _get_ec2_data added type hints which were incompatible with Focal's python3.8. Attempts to run apport-bug cloud-init on focal results in immediate tracebacks which collecting apport info: *** Collecting problem information The collected information can be sent to the developers to improve the application. This might take a few minutes. ......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 . *** 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? This regression will block SRU to focal. It does not affect Jammy or later series [Impact] On Focal systems, inability to report using apport CLI. apport-bug cloud-init will Traceback preventing apport report collection. This would force folks to manually file bugs against cloud-init and attach supporting evidence at https://bugs.launchpad.net/ubuntu/+source/cloud-init/bugs. [ Test Plan ] Assert `apport-bug cloud-init` doesn't immediately traceback on the commandline and includes expected Cloud* report fields for openstack and ec2. test script (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 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 Report could omit new Cloud* keys if instance-data.json is not processed correctly. More likely, if python code/syntax or logic is invalid apport command will quickly generate Tracebacks on unexpected values or data types. This would prevent someone from creating cloud-init specific bugs on the apport CLI. [ Other Info ] This bug represents a SRU regression found during testing cloud-init 23.2 in -proposed and only affects Focal. It doesn't regress Jammy, Kinetic or Lunar series. [ Original Description ] SRU verification regression found during testing of https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1724623. cloud-init 23.2 introduced a couple new functions to extract cloud-specific values automatically for apport bug reports in apport/general-hooks/cloud_init.py. The functions _get_azure_data and _get_ec2_data added type hints which were incompatible with Focal's python3.8. Attempts to run apport-bug cloud-init on focal results in immediate tracebacks which collecting apport info: *** Collecting problem information The collected information can be sent to the developers to improve the application. This might take a few minutes. ......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 . *** 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? This regression will block SRU to focal. It does not affect Jammy or later series
2023-06-30 16:55:44 Andreas Hasenack cloud-init (Ubuntu Focal): status New Fix Committed
2023-06-30 16:55:45 Andreas Hasenack bug added subscriber Ubuntu Stable Release Updates Team
2023-06-30 16:55:48 Andreas Hasenack bug added subscriber SRU Verification
2023-06-30 16:55:53 Andreas Hasenack tags verification-needed verification-needed-focal
2023-07-10 16:38:59 Chad Smith tags verification-needed verification-needed-focal verification-done verification-done-focal
2023-07-10 16:41:39 Chad Smith attachment added sru-1724623.log https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2025376/+attachment/5685220/+files/sru-1724623.log
2023-07-13 23:50:48 Launchpad Janitor cloud-init (Ubuntu Focal): status Fix Committed Fix Released
2023-07-13 23:50:57 Andreas Hasenack removed subscriber Ubuntu Stable Release Updates Team
2023-08-30 13:45:39 Chad Smith cloud-init (Ubuntu): status Fix Committed Fix Released