Comment 23 for bug 2064132

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

==== sru validation complete noble ====
csmith@downtown:~$ bash ./sru-2064132.sh
+ cat
+ cat
+ for SERIES in "noble"
+ echo '---------- SRU verification: noble'
---------- SRU verification: noble
+ name=test-no-snap-noble
+ lxc launch ubuntu-daily:noble test-no-snap-noble
Creating test-no-snap-noble
Starting test-no-snap-noble
+ sleep 6
+ lxc exec test-no-snap-noble -- cloud-init status --wait
.....
status: done
+ lxc exec test-no-snap-noble -- apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [89.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [89.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease [89.7 kB]
Get:5 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [26.7 kB]
Get:6 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [8124 B]
Get:7 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [10.6 kB]
Get:8 http://security.ubuntu.com/ubuntu noble-security/universe Translation-en [4596 B]
Get:9 http://security.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [112 B]
Get:10 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 c-n-f Metadata [116 B]
Get:11 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [15.0 MB]
Get:12 http://archive.ubuntu.com/ubuntu noble/universe Translation-en [5982 kB]
Get:13 http://archive.ubuntu.com/ubuntu noble/universe amd64 Components [3871 kB]
Get:14 http://archive.ubuntu.com/ubuntu noble/universe amd64 c-n-f Metadata [301 kB]
Get:15 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [269 kB]
Get:16 http://archive.ubuntu.com/ubuntu noble/multiverse Translation-en [118 kB]
Get:17 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Components [35.0 kB]
Get:18 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 c-n-f Metadata [8328 B]
Get:19 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [28.4 kB]
Get:20 http://archive.ubuntu.com/ubuntu noble-updates/main Translation-en [8996 B]
Get:21 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [17.6 kB]
Get:22 http://archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [6096 B]
Get:23 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [112 B]
Get:24 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 c-n-f Metadata [116 B]
Get:25 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 c-n-f Metadata [112 B]
Get:26 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [3936 B]
Get:27 http://archive.ubuntu.com/ubuntu noble-backports/universe Translation-en [1392 B]
Get:28 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 c-n-f Metadata [116 B]
Get:29 http://archive.ubuntu.com/ubuntu noble-backports/restricted amd64 c-n-f Metadata [116 B]
Get:30 http://archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 26.0 MB in 5s (5274 kB/s)
Reading package lists... Done
+ lxc exec test-no-snap-noble -- apt-get install cloud-init -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cloud-init is already the newest version (24.1.3-0ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
+ lxc exec test-no-snap-noble -- cloud-init --version
/usr/bin/cloud-init 24.1.3-0ubuntu3
+ '[' noble = focal ']'
++ cat pkg-update.yaml
+ lxc config set test-no-snap-noble 'cloud-init.user-data=#cloud-config
package_upgrade: true'
+ lxc exec test-no-snap-noble -- cloud-init clean --logs --reboot
+ sleep 6
+ lxc exec test-no-snap-noble -- cloud-init status --wait
......................................
status: done
+ lxc exec test-no-snap-noble -- egrep 'snap.*refresh' /var/log/cloud-init.log
2024-05-10 20:31:07,434 - subp.py[DEBUG]: Running command ['snap', 'refresh'] with allowed return codes [0] (shell=False, capture=True)
2024-05-10 20:31:07,676 - subp.py[DEBUG]: command ['snap', 'refresh'] took 0.2s to run
+ echo 'SUCCESS: found snap refresh on system with snapd'
SUCCESS: found snap refresh on system with snapd
+ lxc exec test-no-snap-noble -- apt-get remove snapd -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  squashfs-tools
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
  snapd
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 107 MB disk space will be freed.
(Reading database ... 34376 files and directories currently installed.)
Removing snapd (2.62+24.04build1) ...
Stopping 'snapd.service', but its triggering units are still active:
snapd.socket
Processing triggers for dbus (1.14.10-4ubuntu4) ...
Processing triggers for man-db (2.12.0-4build2) ...
+ lxc exec test-no-snap-noble -- cloud-init clean --logs --reboot
+ sleep 6
+ lxc exec test-no-snap-noble -- cloud-init status --wait
..........
status: error
+ echo 'SUCCESS: reproduced expected failure on system without snapd'
SUCCESS: reproduced expected failure on system without snapd
+ lxc exec test-no-snap-noble -- egrep 'snap.*refresh' /var/log/cloud-init.log
2024-05-10 20:31:24,382 - subp.py[DEBUG]: Running command ['snap', 'refresh'] with allowed return codes [0] (shell=False, capture=True)
    subp.subp(["snap", "refresh"])
Command: ['snap', 'refresh']
    subp.subp(["snap", "refresh"])
Command: ['snap', 'refresh']
+ echo 'SUCCESS: reproduced expected snap refresh on old cloud-init without snapd'
SUCCESS: reproduced expected snap refresh on old cloud-init without snapd
+ echo --- upgrade cloud-init to -proposed
--- upgrade cloud-init to -proposed
+ lxc file push setup_proposed.sh test-no-snap-noble/
+ lxc exec test-no-snap-noble -- sh /setup_proposed.sh
deb http://archive.ubuntu.com/ubuntu noble-proposed main
Hit:1 http://security.ubuntu.com/ubuntu noble-security InRelease
Get:2 http://archive.ubuntu.com/ubuntu noble-proposed InRelease [256 kB]
Hit:3 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Get:6 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 Packages [37.5 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble-proposed/main Translation-en [15.2 kB]
Get:8 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 Components [23.1 kB]
Get:9 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 c-n-f Metadata [3508 B]
Fetched 335 kB in 1s (549 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
  squashfs-tools
Use 'apt autoremove' to remove it.
The following packages will be upgraded:
  cloud-init
1 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
Need to get 598 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble-proposed/main amd64 cloud-init all 24.1.3-0ubuntu3.2 [598 kB]
Fetched 598 kB in 1s (633 kB/s)
Preconfiguring packages ...
(Reading database ... 34281 files and directories currently installed.)
Preparing to unpack .../cloud-init_24.1.3-0ubuntu3.2_all.deb ...
Unpacking cloud-init (24.1.3-0ubuntu3.2) over (24.1.3-0ubuntu3) ...
Setting up cloud-init (24.1.3-0ubuntu3.2) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for rsyslog (8.2312.0-3ubuntu9) ...
Scanning processes...

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
+ lxc exec test-no-snap-noble -- cloud-init clean --logs --reboot
+ sleep 6
+ lxc exec test-no-snap-noble -- cloud-init status --wait --format=yaml
---
boot_status_code: enabled-by-generator
datasource: lxd
detail: DataSourceLXD
errors: []
extended_status: done
init:
    errors: []
    finished: 1715373104.0234022
    recoverable_errors: {}
    start: 1715373103.3344626
init-local:
    errors: []
    finished: 1715373102.765552
    recoverable_errors: {}
    start: 1715373102.5222757
last_update: Fri, 10 May 2024 20:31:48 +0000
modules-config:
    errors: []
    finished: 1715373104.6662822
    recoverable_errors: {}
    start: 1715373104.4280999
modules-final:
    errors: []
    finished: 1715373108.178184
    recoverable_errors: {}
    start: 1715373105.0485394
recoverable_errors: {}
stage: null
status: done
...

+ lxc exec test-no-snap-noble -- egrep 'snap.*refresh' /var/log/cloud-init.log
+ echo 'SUCCESS: did not find snap refresh on system without snapd'
SUCCESS: did not find snap refresh on system without snapd