canonical / multipass

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

[daemon] fails to locate images early on start #1995

Open Saviq opened 3 years ago

Saviq commented 3 years ago

Given these steps:

curl --location --output multipass.pkg https://multipass.run/download/macos
sudo installer -dumplog -target / -pkg multipass.pkg

multipass find
multipass start || sleep 10
multipass start
multipass list

If a system/network is slow enough, it will fail to find images immediately on startup:

...
installer: Package name is multipass
installer: Installing at base path /
installer: The install was successful.
No images found.
launch failed: Remote "" is unknown or unreachable.                             
[2021-03-05T09:23:36.942] [info] [rpc] gRPC listening on unix:/var/run/multipass_socket, SSL:on
[2021-03-05T09:23:36.964] [warning] [Qt] QIODevice::write (QFile, "/var/root/Library/Caches/multipassd/vault/multipassd-image-records.json"): device not open
[2021-03-05T09:23:36.969] [info] [daemon] Starting Multipass 1.6.2+mac
[2021-03-05T09:23:36.969] [info] [daemon] Daemon arguments: /Library/Application Support/com.canonical.multipass/bin/multipassd --verbosity debug
[2021-03-05T09:23:37.996] [debug] [update] Latest Multipass release available is version 1.6.2

Launched: primary                                                               
Mounted '/Users/cibot' into 'primary:Home'                                      

Name                    State             IPv4             Image                
primary                 Running           192.168.64.2     Ubuntu 20.04 LTS
Saviq commented 3 years ago

FWIW, what I'd like to happen is:

  1. on startup, block/timeout on streams before serving any queued requests
  2. when it fails to retrieve the streams, a better error message
Saviq commented 3 years ago

Another symptom, even though find shows the images, launch may still fail:

$ multipass find
Image                       Aliases           Version          Description
core                        core16            20200818         Ubuntu Core 16
core18                                        20200812         Ubuntu Core 18
18.04                       bionic            20210325         Ubuntu 18.04 LTS
20.04                       focal,lts         20210325         Ubuntu 20.04 LTS
20.10                       groovy            20210325         Ubuntu 20.10
daily:21.04                 devel,hirsute     20210412         Ubuntu 21.04
appliance:adguard-home                        20200812         Ubuntu AdGuard Home Appliance
appliance:mosquitto                           20200812         Ubuntu Mosquitto Appliance
appliance:nextcloud                           20200812         Ubuntu Nextcloud Appliance
appliance:openhab                             20200812         Ubuntu openHAB Home Appliance
appliance:plexmediaserver                     20200812         Ubuntu Plex Media Server Appliance

$ multipass launch
launch failed: Remote "" is unknown or unreachable.