==== focal SRU verification complete ===
 echo '---------- SRU verification: focal'
---------- SRU verification: focal
+ name=test-no-snap-focal
+ lxc launch ubuntu-daily:focal test-no-snap-focal
Creating test-no-snap-focal
Starting test-no-snap-focal
+ sleep 6
+ lxc exec test-no-snap-focal -- cloud-init status --wait
....................
status: done
+ lxc exec test-no-snap-focal -- apt-get update
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease                          
       
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]         
       
Get:4 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages 
[2919 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [438 
kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]       
     
Get:7 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 
Packages [2799 kB]   
Get:8 http://security.ubuntu.com/ubuntu focal-security/restricted 
Translation-en [391 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages 
[959 kB]        
Get:10 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en 
[202 kB] 
Get:11 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f 
Metadata [19.2 kB]  
Get:12 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 
Packages [24.0 kB]        
Get:13 http://security.ubuntu.com/ubuntu focal-security/multiverse 
Translation-en [5904 B]  
Get:14 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f 
Metadata [548 B]  
Get:15 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [8628 kB] 
Get:16 http://archive.ubuntu.com/ubuntu focal/universe Translation-en [5124 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata 
[265 kB]                                                                        
                          
Get:18 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 
kB]                                                                             
                         
Get:19 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 
kB]                                                                             
                         
Get:20 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata 
[9136 B]                                                                        
                        
Get:21 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [3296 
kB]                                                                             
                      
Get:22 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [521 
kB]                                                                             
                       
Get:23 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages 
[2916 kB]                                                                       
                      
Get:24 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en 
[407 kB]                                                                        
                      
Get:25 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages 
[1185 kB]                                                                       
                        
Get:26 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en 
[284 kB]                                                                        
                        
Get:27 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f 
Metadata [25.7 kB]                                                              
                           
Get:28 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages 
[26.2 kB]                                                                       
                      
Get:29 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en 
[7880 B]                                                                        
                      
Get:30 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f 
Metadata [620 B]                                                                
                         
Get:31 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages 
[45.7 kB]                                                                       
                          
Get:32 http://archive.ubuntu.com/ubuntu focal-backports/main Translation-en 
[16.3 kB]                                                                       
                          
Get:33 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f 
Metadata [1420 B]                                                               
                             
Get:34 http://archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f 
Metadata [116 B]                                                                
                       
Get:35 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages 
[25.0 kB]                                                                       
                      
Get:36 http://archive.ubuntu.com/ubuntu focal-backports/universe Translation-en 
[16.3 kB]                                                                       
                      
Get:37 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f 
Metadata [880 B]                                                                
                         
Get:38 http://archive.ubuntu.com/ubuntu focal-backports/multiverse amd64 c-n-f 
Metadata [116 B]                                                                
                       
Fetched 31.1 MB in 11s (2751 kB/s)                                              
                                                                                
                      
Reading package lists... Done
+ lxc exec test-no-snap-focal -- apt-get install cloud-init -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cloud-init is already the newest version (24.1.3-0ubuntu1~20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
+ lxc exec test-no-snap-focal -- cloud-init --version
/usr/bin/cloud-init 24.1.3-0ubuntu1~20.04.1
+ '[' focal = focal ']'
+ lxc file push pkg-update.yaml 
test-no-snap-focal/var/lib/cloud/seed/nocloud-net/user-data
+ lxc exec test-no-snap-focal -- cloud-init clean --logs --reboot               
                                          
+ sleep 6
+ lxc exec test-no-snap-focal -- cloud-init status --wait
....................................................................................................................
status: done
+ lxc exec test-no-snap-focal -- egrep 'snap.*refresh' /var/log/cloud-init.log
2024-05-10 18:22:58,086 - subp.py[DEBUG]: Running command ['snap', 'refresh'] 
with allowed return codes [0] (shell=False, capture=True)
2024-05-10 18:22:59,347 - subp.py[DEBUG]: command ['snap', 'refresh'] took 1.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-focal -- apt-get remove snapd -y
Reading package lists... Done
Building dependency tree       
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 ... 32194 files and directories currently installed.)
Removing snapd (2.62+20.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.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.
Warning: Stopping snapd.service, but it can still be activated by:
  snapd.socket
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
+ lxc exec test-no-snap-focal -- cloud-init clean --logs --reboot
+ sleep 6
+ lxc exec test-no-snap-focal -- cloud-init status --wait
....................
status: error
+ echo 'SUCCESS: reproduced expected failure on system without snapd'
SUCCESS: reproduced expected failure on system without snapd
+ echo 'FAILED: did not see expected error on system without snapd'
FAILED: did not see expected error on system without snapd
+ lxc exec test-no-snap-focal -- egrep 'snap.*refresh' /var/log/cloud-init.log
2024-05-10 18:23:19,507 - 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: found snap refresh on failed system without snapd'
SUCCESS: found snap refresh on failed system without snapd
+ echo --- upgrade cloud-init to -proposed
--- upgrade cloud-init to -proposed
+ lxc file push setup_proposed.sh test-no-snap-focal/
+ lxc exec test-no-snap-focal -- sh /setup_proposed.sh                          
                     
deb http://archive.ubuntu.com/ubuntu focal-proposed main
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:4 http://archive.ubuntu.com/ubuntu focal-proposed InRelease [267 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 Packages [277 
kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-proposed/main Translation-en [58.4 
kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 c-n-f Metadata 
[1324 B]
Fetched 718 kB in 2s (357 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 563 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/main amd64 cloud-init all 
24.1.3-0ubuntu1~20.04.4 [563 kB]
Fetched 563 kB in 1s (572 kB/s)
Preconfiguring packages ...
(Reading database ... 32103 files and directories currently installed.)
Preparing to unpack .../cloud-init_24.1.3-0ubuntu1~20.04.4_all.deb ...
Unpacking cloud-init (24.1.3-0ubuntu1~20.04.4) over (24.1.3-0ubuntu1~20.04.1) 
...
Setting up cloud-init (24.1.3-0ubuntu1~20.04.4) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for rsyslog (8.2001.0-1ubuntu1.3) ...
+ lxc exec test-no-snap-focal -- cloud-init clean --logs --reboot
+ sleep 6
+ lxc exec test-no-snap-focal -- cloud-init status --wait --format=yaml
---
_schema_version: '1'
boot_status_code: enabled-by-generator
datasource: nocloud
detail: DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]
errors: []
extended_status: done
init:
    errors: []
    finished: 1715365424.8135493
    recoverable_errors: {}
    start: 1715365424.365326
init-local:
    errors: []
    finished: 1715365423.4399607
    recoverable_errors: {}
    start: 1715365423.1829262
last_update: Fri, 10 May 2024 18:24:04 +0000
modules-config:
    errors: []
    finished: 1715365425.5911787
    recoverable_errors: {}
    start: 1715365425.2994678
modules-final:
    errors: []
    finished: 1715365444.6251307
    recoverable_errors: {}
    start: 1715365426.0195067
recoverable_errors: {}
schemas:
    '1':
        boot_status_code: enabled-by-generator
        datasource: nocloud
        detail: DataSourceNoCloud 
[seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]
        errors: []
        extended_status: done
        init:
            errors: []
            finished: 1715365424.8135493
            recoverable_errors: {}
            start: 1715365424.365326
        init-local:
            errors: []
            finished: 1715365423.4399607
            recoverable_errors: {}
            start: 1715365423.1829262
        last_update: Fri, 10 May 2024 18:24:04 +0000
        modules-config:
            errors: []
            finished: 1715365425.5911787
            recoverable_errors: {}
            start: 1715365425.2994678
        modules-final:
            errors: []
            finished: 1715365444.6251307
            recoverable_errors: {}
            start: 1715365426.0195067
        recoverable_errors: {}
        stage: null
        status: done
stage: null
status: done
...

+ lxc exec test-no-snap-focal -- 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
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to