Public bug reported:

In Ubuntu images that do not have snapd debian package installed
launching with the following user-data triggers cloud-init to run `snap
refresh` when that command doesn't exist.


reproducer:
lxc launch ubuntu-daily:jammy test-no-snap
sleep 3
lxc exec test-no-snap -- cloud-init status --wait
lxc exec test-no-snap -- apt remove snapd -y

cat > pkg-update.yaml <<EOF
#cloud-config
package_update: true
EOF

lxc config set test-no-snap cloud-init.user-data="$(cat pkg-update.yaml)"
lxc exec test-no-snap -- cloud-init clean --logs --reboot
sleep 3

# expect no warnings/errors
lxc exec test-no-snap -- cloud-init status --wait --format=yaml


# ensure no calls to snap refresh
lxc exec test-no-snap -- egrep 'snap.*refresh' /var/log/cloud-init.log

** Affects: cloud-init (Ubuntu)
     Importance: Critical
     Assignee: Chad Smith (chad.smith)
         Status: Fix Committed


** Tags: regression-update

** Bug watch added: github.com/canonical/cloud-init/issues #5143
   https://github.com/canonical/cloud-init/issues/5143

-- 
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 `update_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