## new-upstream-snapshot is ## https://github.com/cloud-init/qa-scripts/blob/master/scripts/new-upstream-snapshot ## It creates builds an image with proposed enabled and the listed package(s) ## upgraded. Build it here, you can see ssh-import-id gets new version ## 5.7-0ubuntu1.1 $ lxc-proposed-snapshot --proposed --upgrade=ssh-import-id --publish bionic b-proposed Creating b-proposed-1112030605 Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [83.2 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [65.5 kB] Get:5 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [61.8 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-proposed InRelease [242 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [22.7 kB] Get:8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [15.1 kB] Get:9 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [7616 B] Get:10 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8570 kB] Get:11 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [1164 B] Get:12 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [632 B] Get:13 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4941 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB] Get:15 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB] Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [80.9 kB] Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [29.7 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [32.4 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [17.0 kB] Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [1728 B] Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [1236 B] Get:22 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages [26.7 kB] Get:23 http://archive.ubuntu.com/ubuntu bionic-proposed/main Translation-en [12.4 kB] Get:24 http://archive.ubuntu.com/ubuntu bionic-proposed/universe amd64 Packages [35.8 kB] Get:25 http://archive.ubuntu.com/ubuntu bionic-proposed/universe Translation-en [14.0 kB] Fetched 14.6 MB in 5s (3122 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: libfreetype6 Use 'apt autoremove' to remove it. The following packages will be upgraded: ssh-import-id 1 upgraded, 0 newly installed, 0 to remove and 22 not upgraded. Need to get 10.9 kB of archives. After this operation, 1024 B of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 ssh-import-id all 5.7-0ubuntu1.1 [10.9 kB] Fetched 10.9 kB in 0s (55.0 kB/s) (Reading database ... 28478 files and directories currently installed.) Preparing to unpack .../ssh-import-id_5.7-0ubuntu1.1_all.deb ... Unpacking ssh-import-id (5.7-0ubuntu1.1) over (5.7-0ubuntu1) ... Processing triggers for man-db (2.8.3-2) ... Setting up ssh-import-id (5.7-0ubuntu1.1) ... Container published with fingerprint: 2dbb1748b04d527783eb22dfc14a8b79be5aabee649848a1a06ad34684296555 ## now create user-data and start an instance of the published proposed image. $ ud=$(printf '%s\n%s\n' '#!/bin/sh' 'ssh-import-id smoser') $ lxc launch b-proposed $name "--config=user.user-data=$ud" Creating b1570997 Starting b1570997 ## sleep a bit to let it work. $ sleep 10 ## cloud-init did not record fail as it would previously. $ lxc exec "$name" -- cat /run/cloud-init/result.json { "v1": { "datasource": "DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net]", "errors": [] } } $ lxc exec "$name" -- grep "ssh-import-id lp:smoser" \ /root/.ssh/authorized_keys && echo GOOD || echo FAIL ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3I7VUf2l5gSn5uavROsc5HRDpZdQueUq5ozemNSj8T7enqKHOEaFoU2VoPgGEWC9RyzSQVeyD6s7APMcE82EtmW4skVEgEGSbDc1pvxzxtchBj78hJP6Cf5TCMFSXw+Fz5rF1dR23QDbN1mkHs7adr8GW4kSWqU7Q7NDwfIrJJtO7Hi42GyXtvEONHbiRPOe8stqUly7MvUoN+5kfjBM8Qqpfl2+FNhTYWpMfYdPUnE7u536WqzFmsaqJctz3gBxH9Ex7dFtrxR4qiqEr9Qtlu3xGn7Bw07/+i1D+ey3ONkZLN+LQ714cgj8fRS4Hj29SCmXp5Kt5/82cD/VN3NtHw== smoser@brickies-canonical # ssh-import-id lp:smoser ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkoSfSOCSEpB9Fzhh5SiDINaOJQ4RC9xyWRhfjXLnkaYc36nZX08sfWLYJEZWLqaDZecGS8rFCXW4qK1hPV2ovBEjHrt6VlyFssJVSNANlxyNKh0x2TJUjxhHXiq6HyyoN099LsdxQv45RVVmqLx0qadY/0DZSwvIld/XTofcESMCOKwxT1aRiFQ4fAP71n/BkFE42Y3+cgBGuxkNNcNODo/23g239f+wGkuZ3aHWOi6iHN02qBz2R0WGHKszSu9X0zeHl7wrnj4G7WE9hgMRuFu5yDb+AkiPeWgxLjPQ1JhKPDUIzIZRh7cUDQSXbabilgnzTjHo9mjd/kZ7cLOHP smoser@bart-canonical # ssh-import-id lp:smoser ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkw+jOEGEBjvgvta3AM3MKNWNhlHpkbo8DnBXF7hJPq/q9xH59X7sx8oBvxUVShAxDBSRYYppP21zLNS+83kyPVuKXG9t4NPd5UoGTe3KhG3gMoAnev3ok1AFtZ4dEA1PNBOu1NFniUDuC3SwfMbzSiJiaz9ku4WaRGYZ5Ef35bS5924f8xA0bTR+Pj1O/7jyASvsrGo2aalQsKK7khKbEBz1Gz6uFoiAYO13ftvS3IMhzP06b5xw6qgXixkZfqye2Fn/teJ07BOuKq5d/wTPLbP1Db+qAQ60n+OLc1/hMAlf0LaX0VHGXvHAQlPl4n7+FzAE1UmWFYEGrsSoNvLv3 smoser@kaypeah # ssh-import-id lp:smoser GOOD