canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.85k stars 650 forks source link

Multipass finds image ghosts in the cache and tries to launch with them #2172

Open ricab opened 3 years ago

ricab commented 3 years ago

Describe the bug

I get this for older images with 1.7:

$ multipass launch vivid
launch failed: Downloaded image hash does not match
$ multipass version
multipass  1.7.0-rc.899+g38dcd724
multipassd 1.7.0-rc.899+g38dcd724

where before (1.6.2) I got:

$ multipass launch vivid
launch failed: failed to download from 'https://cloud-images.ubuntu.com/releases/server/releases/vivid/release-20160203/ubuntu-15.04-server-cloudimg-amd64-disk1.img': Insecure redirect

These are logged

jul 09 17:33:56 ricab-xps13 multipassd[93424]: [93734] started: qemu-system-x86_64 --version
jul 09 17:33:57 ricab-xps13 multipassd[93424]: Error getting https://cloud-images.ubuntu.com/releases/server/releases/vivid/release-20160203/ubuntu-15.04-server-cloudimg-amd64-disk1.img: Insecure redirect - trying cache.
jul 09 17:33:57 ricab-xps13 multipassd[93424]: Found https://cloud-images.ubuntu.com/releases/server/releases/vivid/release-20160203/ubuntu-15.04-server-cloudimg-amd64-disk1.img in cache: true

so it looks like we are finding things in the cache that aren't actually there.

Expected behavior

Multipass would report the "insecure redirect" and abort the launch.

Additional info

Similar to https://github.com/canonical/multipass/issues/1350, but only appearing in 1.7.

VijitSingh97 commented 2 years ago

I'm seeing the same in 1.8.0+Mac, tried to clear the cache and ran uninstall.sh and reinstalled from the .pkg with no luck.