[Bug 1724623] Re: Update ubuntu cloud info
Chad Smith
1724623 at bugs.launchpad.net
Thu Jul 13 19:38:17 UTC 2023
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 at 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 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.svir_fqp.apport
++ lxc exec sru-focal ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.svir_fqp.apport
+ lxc file pull sru-focal/tmp/apport.cloud-init.svir_fqp.apport apport-sru-focal.orig
+ lxc exec sru-focal rm /tmp/apport.cloud-init.svir_fqp.apport
+ lxc file push setup_proposed.sh sru-focal/
+ lxc exec sru-focal -- bash /setup_proposed.sh
+ grep cloud-init
cloud-init
Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 cloud-init all 23.2.1-0ubuntu0~20.04.2 [532 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Preparing to unpack .../cloud-init_23.2.1-0ubuntu0~20.04.2_all.deb ...
Unpacking cloud-init (23.2.1-0ubuntu0~20.04.2) over (23.1.2-0ubuntu0~20.04.2) ...
Setting up cloud-init (23.2.1-0ubuntu0~20.04.2) ...
++ lxc exec sru-focal -- cloud-init --version
+ VERSION='/usr/bin/cloud-init 23.2.1-0ubuntu0~20.04.2'
+ '[' '/usr/bin/cloud-init ~20.04.2' '!=' '/usr/bin/cloud-init 23.2.1-0ubuntu0~20.04.2' ']'
+ lxc file push openstack.json sru-focal/run/cloud-init/instance-data.json
+ echo --- 2. Generate -proposed apport report which sources openstack instance-data.json, selecting Openstack as cloud.
--- 2. Generate -proposed apport report which sources openstack instance-data.json, selecting Openstack as cloud.
+ 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
.
*** 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 (44.7 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.o550ccfg.apport
++ lxc exec sru-focal ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.o550ccfg.apport
+ lxc file pull sru-focal/tmp/apport.cloud-init.o550ccfg.apport apport-sru-focal.openstack-proposed
+ lxc exec sru-focal rm /tmp/apport.cloud-init.o550ccfg.apport
+ echo --- 3. Generate -proposed apport report which sources ec2 instance-data, selecting Ec2 as cloud.
--- 3. Generate -proposed apport report which sources ec2 instance-data, selecting Ec2 as cloud.
+ lxc file push ec2.json sru-focal/run/cloud-init/instance-data.json
+ 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
.
*** 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 (44.7 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.xwtvk7b5.apport
++ lxc exec sru-focal ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.xwtvk7b5.apport
+ lxc file pull sru-focal/tmp/apport.cloud-init.xwtvk7b5.apport apport-sru-focal.ec2-proposed
+ lxc exec sru-focal rm /tmp/apport.cloud-init.xwtvk7b5.apport
+ echo --- 4. Verify tags openstack-proposed report
--- 4. Verify tags openstack-proposed report
+ grep 'CloudID: openstack' apport-sru-focal.openstack-proposed
CloudID: openstack
+ grep 'CloudName: openstack' apport-sru-focal.openstack-proposed
CloudName: openstack
+ grep 'CloudPlatform: openstack' apport-sru-focal.openstack-proposed
CloudPlatform: openstack
+ echo --- 5. Verify tags of ec2-proposed to ec2-proposed report
--- 5. Verify tags of ec2-proposed to ec2-proposed report
+ grep CloudID: apport-sru-focal.ec2-proposed
+ grep 'CloudName: aws' apport-sru-focal.ec2-proposed
CloudName: aws
+ grep 'CloudPlatform: ec2' apport-sru-focal.ec2-proposed
CloudPlatform: ec2
+ grep 'CloudRegion: us-east-2' apport-sru-focal.ec2-proposed
CloudRegion: us-east-2
+ for release in focal 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, 13 Jul 2023 19:32:11 +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
+ echo --- VERSION OF APPORT ---
--- VERSION OF APPORT ---
+ lxc exec sru-jammy -- apport-bug --version
2.20.11
+ 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 (65.4 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.vifx8je0.apport
++ lxc exec sru-jammy ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.vifx8je0.apport
+ lxc file pull sru-jammy/tmp/apport.cloud-init.vifx8je0.apport apport-sru-jammy.orig
+ lxc exec sru-jammy rm /tmp/apport.cloud-init.vifx8je0.apport
+ lxc file push setup_proposed.sh sru-jammy/
+ grep cloud-init
+ lxc exec sru-jammy -- bash /setup_proposed.sh
cloud-init
Get:1 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 cloud-init all 23.2.1-0ubuntu0~22.04.1 [533 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Preparing to unpack .../cloud-init_23.2.1-0ubuntu0~22.04.1_all.deb ...
Unpacking cloud-init (23.2.1-0ubuntu0~22.04.1) over (23.1.2-0ubuntu0~22.04.1) ...
Setting up cloud-init (23.2.1-0ubuntu0~22.04.1) ...
++ lxc exec sru-jammy -- cloud-init --version
+ VERSION='/usr/bin/cloud-init 23.2.1-0ubuntu0~22.04.1'
+ '[' '/usr/bin/cloud-init ~22.04.1' '!=' '/usr/bin/cloud-init 23.2.1-0ubuntu0~22.04.1' ']'
+ lxc file push openstack.json sru-jammy/run/cloud-init/instance-data.json
+ echo --- 2. Generate -proposed apport report which sources openstack instance-data.json, selecting Openstack as cloud.
--- 2. Generate -proposed apport report which sources openstack instance-data.json, selecting Openstack as cloud.
+ 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
*** 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.1 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.yh422m8z.apport
++ lxc exec sru-jammy ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.yh422m8z.apport
+ lxc file pull sru-jammy/tmp/apport.cloud-init.yh422m8z.apport apport-sru-jammy.openstack-proposed
+ lxc exec sru-jammy rm /tmp/apport.cloud-init.yh422m8z.apport
+ echo --- 3. Generate -proposed apport report which sources ec2 instance-data, selecting Ec2 as cloud.
--- 3. Generate -proposed apport report which sources ec2 instance-data, selecting Ec2 as cloud.
+ lxc file push ec2.json sru-jammy/run/cloud-init/instance-data.json
+ 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
*** 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.1 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.8wcstclm.apport
++ lxc exec sru-jammy ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.8wcstclm.apport
+ lxc file pull sru-jammy/tmp/apport.cloud-init.8wcstclm.apport apport-sru-jammy.ec2-proposed
+ lxc exec sru-jammy rm /tmp/apport.cloud-init.8wcstclm.apport
+ echo --- 4. Verify tags openstack-proposed report
--- 4. Verify tags openstack-proposed report
+ grep 'CloudID: openstack' apport-sru-jammy.openstack-proposed
CloudID: openstack
+ grep 'CloudName: openstack' apport-sru-jammy.openstack-proposed
CloudName: openstack
+ grep 'CloudPlatform: openstack' apport-sru-jammy.openstack-proposed
CloudPlatform: openstack
+ echo --- 5. Verify tags of ec2-proposed to ec2-proposed report
--- 5. Verify tags of ec2-proposed to ec2-proposed report
+ grep CloudID: apport-sru-jammy.ec2-proposed
+ grep 'CloudName: aws' apport-sru-jammy.ec2-proposed
CloudName: aws
+ grep 'CloudPlatform: ec2' apport-sru-jammy.ec2-proposed
CloudPlatform: ec2
+ grep 'CloudRegion: us-east-2' apport-sru-jammy.ec2-proposed
CloudRegion: us-east-2
+ for release in focal jammy kinetic lunar
+ VM=sru-kinetic
+ lxc launch ubuntu-daily:kinetic sru-kinetic
Creating sru-kinetic
Starting sru-kinetic
+ lxc exec sru-kinetic -- cloud-init status --wait --long
..............................
status: done
boot_status_code: enabled-by-generator
last_update: Thu, 13 Jul 2023 19:33:11 +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
+ echo --- VERSION OF APPORT ---
--- VERSION OF APPORT ---
+ lxc exec sru-kinetic -- apport-bug --version
2.23.1
+ lxc exec sru-kinetic -- 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.7 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.4a6eqyo_.apport
++ lxc exec sru-kinetic ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.4a6eqyo_.apport
+ lxc file pull sru-kinetic/tmp/apport.cloud-init.4a6eqyo_.apport apport-sru-kinetic.orig
+ lxc exec sru-kinetic rm /tmp/apport.cloud-init.4a6eqyo_.apport
+ lxc file push setup_proposed.sh sru-kinetic/
+ lxc exec sru-kinetic -- bash /setup_proposed.sh
+ grep cloud-init
cloud-init
Get:1 http://archive.ubuntu.com/ubuntu kinetic-proposed/main amd64 cloud-init all 23.2.1-0ubuntu0~22.10.1 [527 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Preparing to unpack .../cloud-init_23.2.1-0ubuntu0~22.10.1_all.deb ...
Unpacking cloud-init (23.2.1-0ubuntu0~22.10.1) over (23.1.2-0ubuntu0~22.10.1) ...
Setting up cloud-init (23.2.1-0ubuntu0~22.10.1) ...
++ lxc exec sru-kinetic -- cloud-init --version
+ VERSION='/usr/bin/cloud-init 23.2.1-0ubuntu0~22.10.1'
+ '[' '/usr/bin/cloud-init ~22.10.1' '!=' '/usr/bin/cloud-init 23.2.1-0ubuntu0~22.10.1' ']'
+ lxc file push openstack.json sru-kinetic/run/cloud-init/instance-data.json
+ echo --- 2. Generate -proposed apport report which sources openstack instance-data.json, selecting Openstack as cloud.
--- 2. Generate -proposed apport report which sources openstack instance-data.json, selecting Openstack as cloud.
+ lxc exec sru-kinetic -- 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
*** 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 (67.2 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.8irh7hm4.apport
++ lxc exec sru-kinetic ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.8irh7hm4.apport
+ lxc file pull sru-kinetic/tmp/apport.cloud-init.8irh7hm4.apport apport-sru-kinetic.openstack-proposed
+ lxc exec sru-kinetic rm /tmp/apport.cloud-init.8irh7hm4.apport
+ echo --- 3. Generate -proposed apport report which sources ec2 instance-data, selecting Ec2 as cloud.
--- 3. Generate -proposed apport report which sources ec2 instance-data, selecting Ec2 as cloud.
+ lxc file push ec2.json sru-kinetic/run/cloud-init/instance-data.json
+ lxc exec sru-kinetic -- 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
.
*** 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 (67.3 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): l
What would you like to do? Your options are:
S: Send report (67.3 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.m7y1oy5g.apport
++ lxc exec sru-kinetic ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.m7y1oy5g.apport
+ lxc file pull sru-kinetic/tmp/apport.cloud-init.m7y1oy5g.apport apport-sru-kinetic.ec2-proposed
+ lxc exec sru-kinetic rm /tmp/apport.cloud-init.m7y1oy5g.apport
+ echo --- 4. Verify tags openstack-proposed report
--- 4. Verify tags openstack-proposed report
+ grep 'CloudID: openstack' apport-sru-kinetic.openstack-proposed
CloudID: openstack
+ grep 'CloudName: openstack' apport-sru-kinetic.openstack-proposed
CloudName: openstack
+ grep 'CloudPlatform: openstack' apport-sru-kinetic.openstack-proposed
CloudPlatform: openstack
+ echo --- 5. Verify tags of ec2-proposed to ec2-proposed report
--- 5. Verify tags of ec2-proposed to ec2-proposed report
+ grep CloudID: apport-sru-kinetic.ec2-proposed
+ grep 'CloudName: aws' apport-sru-kinetic.ec2-proposed
CloudName: aws
+ grep 'CloudPlatform: ec2' apport-sru-kinetic.ec2-proposed
CloudPlatform: ec2
+ grep 'CloudRegion: us-east-2' apport-sru-kinetic.ec2-proposed
CloudRegion: us-east-2
+ for release in focal jammy kinetic lunar
+ VM=sru-lunar
+ lxc launch ubuntu-daily:lunar sru-lunar
Creating sru-lunar
Starting sru-lunar
+ lxc exec sru-lunar -- cloud-init status --wait --long
................................
status: done
boot_status_code: enabled-by-generator
last_update: Thu, 13 Jul 2023 19:34:32 +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
+ echo --- VERSION OF APPORT ---
--- VERSION OF APPORT ---
+ lxc exec sru-lunar -- apport-bug --version
2.26.1
+ lxc exec sru-lunar -- 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 (67.4 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.e79l0q_h.apport
++ grep apport
++ lxc exec sru-lunar ls /tmp
+ APPORT_FILE=apport.cloud-init.e79l0q_h.apport
+ lxc file pull sru-lunar/tmp/apport.cloud-init.e79l0q_h.apport apport-sru-lunar.orig
+ lxc exec sru-lunar rm /tmp/apport.cloud-init.e79l0q_h.apport
+ lxc file push setup_proposed.sh sru-lunar/
+ lxc exec sru-lunar -- bash /setup_proposed.sh
+ grep cloud-init
cloud-init
Get:1 http://archive.ubuntu.com/ubuntu lunar-proposed/main amd64 cloud-init all 23.2.1-0ubuntu0~23.04.1 [563 kB]
Preparing to unpack .../cloud-init_23.2.1-0ubuntu0~23.04.1_all.deb ...
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Unpacking cloud-init (23.2.1-0ubuntu0~23.04.1) over (23.1.2-0ubuntu0~23.04.1) ...
Setting up cloud-init (23.2.1-0ubuntu0~23.04.1) ...
++ lxc exec sru-lunar -- cloud-init --version
+ VERSION='/usr/bin/cloud-init 23.2.1-0ubuntu0~23.04.1'
+ '[' '/usr/bin/cloud-init ~23.04.1' '!=' '/usr/bin/cloud-init 23.2.1-0ubuntu0~23.04.1' ']'
+ lxc file push openstack.json sru-lunar/run/cloud-init/instance-data.json
+ echo --- 2. Generate -proposed apport report which sources openstack instance-data.json, selecting Openstack as cloud.
--- 2. Generate -proposed apport report which sources openstack instance-data.json, selecting Openstack as cloud.
+ lxc exec sru-lunar -- 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
.
*** 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 (67.4 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.qzwsgnwc.apport
++ lxc exec sru-lunar ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.qzwsgnwc.apport
+ lxc file pull sru-lunar/tmp/apport.cloud-init.qzwsgnwc.apport apport-sru-lunar.openstack-proposed
+ lxc exec sru-lunar rm /tmp/apport.cloud-init.qzwsgnwc.apport
+ echo --- 3. Generate -proposed apport report which sources ec2 instance-data, selecting Ec2 as cloud.
--- 3. Generate -proposed apport report which sources ec2 instance-data, selecting Ec2 as cloud.
+ lxc file push ec2.json sru-lunar/run/cloud-init/instance-data.json
+ lxc exec sru-lunar -- 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
*** 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 (67.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.oattgktl.apport
++ lxc exec sru-lunar ls /tmp
++ grep apport
+ APPORT_FILE=apport.cloud-init.oattgktl.apport
+ lxc file pull sru-lunar/tmp/apport.cloud-init.oattgktl.apport apport-sru-lunar.ec2-proposed
+ lxc exec sru-lunar rm /tmp/apport.cloud-init.oattgktl.apport
+ echo --- 4. Verify tags openstack-proposed report
--- 4. Verify tags openstack-proposed report
+ grep 'CloudID: openstack' apport-sru-lunar.openstack-proposed
CloudID: openstack
+ grep 'CloudName: openstack' apport-sru-lunar.openstack-proposed
CloudName: openstack
+ grep 'CloudPlatform: openstack' apport-sru-lunar.openstack-proposed
CloudPlatform: openstack
+ echo --- 5. Verify tags of ec2-proposed to ec2-proposed report
--- 5. Verify tags of ec2-proposed to ec2-proposed report
+ grep CloudID: apport-sru-lunar.ec2-proposed
+ grep 'CloudName: aws' apport-sru-lunar.ec2-proposed
CloudName: aws
+ grep 'CloudPlatform: ec2' apport-sru-lunar.ec2-proposed
CloudPlatform: ec2
+ grep 'CloudRegion: us-east-2' apport-sru-lunar.ec2-proposed
CloudRegion: us-east-2
+ '[' -f failures ']'
+ echo SUCCESS
SUCCESS
** Attachment added: "sru-1724623.sh"
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1724623/+attachment/5686155/+files/sru-1724623.sh
** Changed in: cloud-init (Ubuntu Lunar)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1724623
Title:
Update ubuntu cloud info
Status in Apport:
Fix Released
Status in apport package in Ubuntu:
Fix Released
Status in cloud-init package in Ubuntu:
Fix Released
Status in cloud-init source package in Focal:
Fix Committed
Status in cloud-init source package in Jammy:
Fix Committed
Status in cloud-init source package in Kinetic:
Fix Committed
Status in apport source package in Lunar:
New
Status in cloud-init source package in Lunar:
Fix Released
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/1724623/+subscriptions
More information about the foundations-bugs
mailing list