@Wesley, on more recent versions, if you are in an interactive session, you get a confirmation prompt:
``` $ lxc launch ubuntu-minimal-daily:25.04 c1 Launching c1 $ lxc shell c1 root@c1:~# snap install lxd root@c1:~# snap disable lxd lxd disabled root@c1:~# lxc ls Would you like to install LXD snap now (Y/n)? y Installing LXD snap, please be patient. /usr/sbin/lxc: 49: exec: /snap/bin/lxd.lxc: not found ``` And then it fails due to the `snap install lxd` happening behind the scene failing: ``` root@c1:~# journalctl -f Mar 26 12:47:48 c1 lxd-installer-service[1972]: + snap install lxd --channel=5.21/stable/ubuntu-25.04 Mar 26 12:47:48 c1 snapd[741]: api_snaps.go:467: Installing snap "lxd" revision unset Mar 26 12:47:48 c1 lxd-installer-service[1980]: snap "lxd" is already installed, see 'snap help refresh' Mar 26 12:47:48 c1 lxd-installer-service[1972]: + break Mar 26 12:47:48 c1 lxd-installer-service[1972]: + echo 1 ``` Refreshing doesn't even work, it needs to be re-enabled: ``` root@c1:~# snap refresh lxd error: cannot refresh "lxd": refreshing disabled snap "lxd" not supported root@c1:~# snap list lxd Name Version Rev Tracking Publisher Notes lxd 5.21.3-75def3c 32455 5.21/stable canonical✓ disabled root@c1:~# snap enable lxd lxd enabled ``` However, I'm assuming that since you explicitly `snap disable lxd`, you don't want lxd-installer to re-enable it? I'm assuming you would like lxd-installer to be smarter at detecting LXD's snap presence? If so, I'm thinking of adding an early exit on `snap list lxd >/dev/null 2>&1` returning 0. WDYT? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2104201 Title: LXD installer attempts to install when LXD snap is installed & disabled To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxd-installer/+bug/2104201/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
