After upgraded multipass to 1.3.0, snapcraft cannot work any more.
$ sudo snap refresh multipass --channel stable
multipass 1.3.0 from Canonical✓ refreshed
$ snapcraft
Launching a VM.
snap "snapd" has no updates available
Source path "/parent/work/btctools-snap" does not exist
An error occurred with the instance when trying to mount with 'multipass': returned exit code 1.
Ensure that 'multipass' is setup correctly and try again.
Or got this:
$ snapcraft
Launching a VM.
snap "snapd" has no updates available
Could not find snap/snapcraft.yaml. Are you sure you are in the right directory?
To start a new project, use `snapcraft init`
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
I noticed that multipass now be a strictly confined snap without --classic
. So there seems to be a serious problem with its cooperation with snapcraft.
This will fix the issue:
sudo snap refresh multipass --candidate --classic
Version 1.2.0 with --classic
will be installed. Everything looks OK.
Or if you want a reinstall:
multipass delete snapcraft-btctools
multipass purge
sudo snap remove multipass
sudo snap install multipass --candidate --classic
Update 1
I think it has something to do with my partition structure.
/parent
is a mounted btrfs subvol (subvolid=0, the real rootfs), and /parent/work
is also a btrfs subvol.
/
is also a btrfs subvol, it is the default subvol (so mount without subvolid will get it). And it’s real path: /parent/rootfs
.
$ cat /etc/fstab
# /dev/sda2
UUID=3f0842c7-29e8-4220-93da-e3fea5b3bbcc / btrfs rw,relatime,ssd,space_cache 0 0
UUID=3f0842c7-29e8-4220-93da-e3fea5b3bbcc /parent btrfs rw,relatime,ssd,space_cache,subvolid=0 0 0
I think this is related to my problem because I run my own strictly confined snap (https://snapcraft.io/btctools), and as a result, I found that I couldn’t find /parent
at all, just like it didn’t be mounted.
So it should be a problem of snapd instead of snapcraft?