#5320·multipass

cli-tests: Handle temporary snap install failures gracefully

Author: xmkgCreated Sep 28, 2026Updated Sep 28, 2026
Labelsneeds triage

What are you trying to do? Some of the tests do rely on installing a snap into the guest, like the --classic mount test that installs multipass-sshfs. The snap store may be unreachable from time to time due to a plethora of reasons, like temporary outages, network issues, etc. causing a test to fail:

[2026-09-28T14:06:52.635] [debug] [ssh session] Executing 'sudo snap install multipass-sshfs'
Enabling support for mounting -[2026-09-28T14:07:32.719] [trace] [ssh process] plain_ssh_process.cpp:225, `class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl multipass::PlainSSHProcess::read_stream(enum multipass::PlainSSHProcess::StreamType,int)`: (type = 1, timeout = -1)
[2026-09-28T14:07:32.719] [trace] [ssh process] plain_ssh_process.cpp:245, `class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl multipass::PlainSSHProcess::read_stream(enum multipass::PlainSSHProcess::StreamType,int)`: num_bytes = 36
[2026-09-28T14:07:32.720] [trace] [ssh process] plain_ssh_process.cpp:245, `class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl multipass::PlainSSHProcess::read_stream(enum multipass::PlainSSHProcess::StreamType,int)`: num_bytes = 0
[2026-09-28T14:07:32.720] [error] [sshfs-mount-handler] Failed to install 'multipass-sshfs': error: unable to contact snap store
[2026-09-28T14:07:32.721] [trace] [ssh session] disconnecting SSH session
[2026-09-28T14:07:32.720] [error] [sshfs-mount-handler] Failed to install 'multipass-sshfs': error: unable to contact snap store
mount failed: Error enabling mount support in 'upg-hcs-phase1-mounts'

What's your proposed solution? The CLI tests should try to gracefully handle such errors, even retrying such failures with backoff. Also, instead of failing the test, the suite could raise a warning that says something like "this test cannot be run right now, reasons: bla and bla.".