=== SRU verification complete jammy ===

csmith@downtown:~$ bash ./sru-2064132.sh 
+ cat
+ cat
+ for SERIES in "jammy"
+ echo '---------- SRU verification: jammy'
---------- SRU verification: jammy
+ name=test-no-snap-jammy
+ lxc launch ubuntu-daily:jammy test-no-snap-jammy
Creating test-no-snap-jammy
Starting test-no-snap-jammy
+ sleep 6
+ lxc exec test-no-snap-jammy -- cloud-init status --wait
..................
status: done
+ lxc exec test-no-snap-jammy -- apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages 
[1427 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [14.1 MB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [247 
kB]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 
Packages [1807 kB]     
Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted 
Translation-en [307 kB]  
Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages 
[852 kB]         
Get:11 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en 
[164 kB]   
Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f 
Metadata [16.8 kB]         
Get:13 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 
Packages [37.2 kB]               
Get:14 http://security.ubuntu.com/ubuntu jammy-security/multiverse 
Translation-en [7588 B]          
Get:15 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f 
Metadata [260 B]         
Get:16 http://archive.ubuntu.com/ubuntu jammy/universe Translation-en [5652 kB] 
       
Get:17 http://archive.ubuntu.com/ubuntu jammy/universe amd64 c-n-f Metadata 
[286 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [217 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy/multiverse Translation-en [112 kB]
Get:20 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 c-n-f Metadata 
[8372 B]
Get:21 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1638 
kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [307 
kB]
Get:23 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages 
[1864 kB]
Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en 
[316 kB]
Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages 
[1074 kB]
Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en 
[245 kB]
Get:27 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f 
Metadata [22.1 kB]
Get:28 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages 
[42.7 kB]
Get:29 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en 
[10.4 kB]
Get:30 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 c-n-f 
Metadata [472 B]
Get:31 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages 
[67.1 kB]
Get:32 http://archive.ubuntu.com/ubuntu jammy-backports/main Translation-en 
[11.0 kB]
Get:33 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 c-n-f 
Metadata [388 B]
Get:34 http://archive.ubuntu.com/ubuntu jammy-backports/restricted amd64 c-n-f 
Metadata [116 B]
Get:35 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages 
[27.2 kB]
Get:36 http://archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en 
[16.2 kB]
Get:37 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 c-n-f 
Metadata [644 B]
Get:38 http://archive.ubuntu.com/ubuntu jammy-backports/multiverse amd64 c-n-f 
Metadata [116 B]
Fetched 31.2 MB in 4s (8043 kB/s)                              
Reading package lists... Done
+ lxc exec test-no-snap-jammy -- 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-0ubuntu1~22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
+ lxc exec test-no-snap-jammy -- cloud-init --version
/usr/bin/cloud-init 24.1.3-0ubuntu1~22.04.1
+ '[' jammy = focal ']'
++ cat pkg-update.yaml
+ lxc config set test-no-snap-jammy 'cloud-init.user-data=#cloud-config
package_upgrade: true'
+ lxc exec test-no-snap-jammy -- cloud-init clean --logs --reboot
+ sleep 6
+ lxc exec test-no-snap-jammy -- cloud-init status --wait
...........................................................................................................
status: done
+ lxc exec test-no-snap-jammy -- egrep 'snap.*refresh' /var/log/cloud-init.log
2024-05-10 18:41:42,962 - subp.py[DEBUG]: Running command ['snap', 'refresh'] 
with allowed return codes [0] (shell=False, capture=True)
2024-05-10 18:41:44,046 - subp.py[DEBUG]: command ['snap', 'refresh'] took 1.0s 
to run
+ echo 'SUCCESS: found snap refresh on system with snapd'
SUCCESS: found snap refresh on system with snapd
+ lxc exec test-no-snap-jammy -- 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, 104 MB disk space will be freed.
(Reading database ... 33926 files and directories currently installed.)
Removing snapd (2.62+22.04) ...
Stopping snap.lxd.activate.service
Stopping unit snap.lxd.activate.service
Waiting until unit snap.lxd.activate.service is stopped [attempt 1]
snap.lxd.activate.service is stopped.
Stopping snap.lxd.daemon.service
Stopping unit snap.lxd.daemon.service
Waiting until unit snap.lxd.daemon.service is stopped [attempt 1]
snap.lxd.daemon.service is stopped.
Stopping snap.lxd.user-daemon.service
Stopping unit snap.lxd.user-daemon.service
Waiting until unit snap.lxd.user-daemon.service is stopped [attempt 1]
snap.lxd.user-daemon.service is stopped.
Stopping snap.lxd.daemon.unix.socket
Stopping unit snap.lxd.daemon.unix.socket
Waiting until unit snap.lxd.daemon.unix.socket is stopped [attempt 1]
snap.lxd.daemon.unix.socket is stopped.
Stopping snap.lxd.user-daemon.unix.socket
Stopping unit snap.lxd.user-daemon.unix.socket
Waiting until unit snap.lxd.user-daemon.unix.socket is stopped [attempt 1]
snap.lxd.user-daemon.unix.socket is stopped.
Warning: Stopping snapd.service, but it can still be activated by:
  snapd.socket
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Processing triggers for man-db (2.10.2-1) ...
+ lxc exec test-no-snap-jammy -- cloud-init clean --logs --reboot
+ sleep 6
+ lxc exec test-no-snap-jammy -- 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-jammy -- egrep 'snap.*refresh' /var/log/cloud-init.log
2024-05-10 18:42:02,508 - 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-jammy/
+ lxc exec test-no-snap-jammy -- sh /setup_proposed.sh                          
                     
deb http://archive.ubuntu.com/ubuntu jammy-proposed main
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:5 http://archive.ubuntu.com/ubuntu jammy-proposed InRelease [270 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages [227 
kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-proposed/main Translation-en [51.1 
kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 c-n-f Metadata 
[2740 B]
Fetched 551 kB in 1s (776 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 20 not upgraded.
Need to get 560 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 cloud-init all 
24.1.3-0ubuntu1~22.04.4 [560 kB]
Fetched 560 kB in 1s (613 kB/s)
Preconfiguring packages ...
(Reading database ... 33834 files and directories currently installed.)
Preparing to unpack .../cloud-init_24.1.3-0ubuntu1~22.04.4_all.deb ...
Unpacking cloud-init (24.1.3-0ubuntu1~22.04.4) over (24.1.3-0ubuntu1~22.04.1) 
...
Setting up cloud-init (24.1.3-0ubuntu1~22.04.4) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for rsyslog (8.2112.0-2ubuntu2.2) ...
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-jammy -- cloud-init clean --logs --reboot
+ sleep 6
+ lxc exec test-no-snap-jammy -- cloud-init status --wait --format=yaml
---
_schema_version: '1'
boot_status_code: enabled-by-generator
datasource: lxd
detail: DataSourceLXD
errors: []
extended_status: done
init:
    errors: []
    finished: 1715366546.1266854
    recoverable_errors: {}
    start: 1715366544.902887
init-local:
    errors: []
    finished: 1715366543.605344
    recoverable_errors: {}
    start: 1715366543.4082813
last_update: Fri, 10 May 2024 18:42:41 +0000
modules-config:
    errors: []
    finished: 1715366546.7333205
    recoverable_errors: {}
    start: 1715366546.471286
modules-final:
    errors: []
    finished: 1715366561.4276187
    recoverable_errors: {}
    start: 1715366547.0511541
recoverable_errors: {}
schemas:
    '1':
        boot_status_code: enabled-by-generator
        datasource: lxd
        detail: DataSourceLXD
        errors: []
        extended_status: done
        init:
            errors: []
            finished: 1715366546.1266854
            recoverable_errors: {}
            start: 1715366544.902887
        init-local:
            errors: []
            finished: 1715366543.605344
            recoverable_errors: {}
            start: 1715366543.4082813
        last_update: Fri, 10 May 2024 18:42:41 +0000
        modules-config:
            errors: []
            finished: 1715366546.7333205
            recoverable_errors: {}
            start: 1715366546.471286
        modules-final:
            errors: []
            finished: 1715366561.4276187
            recoverable_errors: {}
            start: 1715366547.0511541
        recoverable_errors: {}
        stage: null
        status: done
stage: null
status: done
...

+ lxc exec test-no-snap-jammy -- 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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2064132

Title:
  images without snapd installed error on `upgrade_packages: true` user-
  data

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2064132/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to