-
-
Notifications
You must be signed in to change notification settings - Fork 555
Description
Description
When starting up a colima.yaml without a mounts: key, it does not default to mounting the user's home directory as documented in the config file.
The config is also updated to mounts: null instead of the documented default of mounts: [].
Version
colima version 0.10.1
git commit: ed90520
runtime: docker
arch: aarch64
client: v29.2.1
server: v29.2.1
limactl version 2.0.3
zsh: command not found: qemu-img
Operating System
- macOS Intel <= 13 (Ventura)
- macOS Intel >= 14 (Sonoma)
- Apple Silicon <= 13 (Ventura)
- Apple Silicon >= 14 (Sonoma)
- Linux
Output of colima status
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] docker socket: unix:///Users/cflee/.colima/default/docker.sock
INFO[0000] containerd socket: unix:///Users/cflee/.colima/default/containerd.sock
Reproduction Steps
- Write or modify the default instance's
colima.yamlto have nomounts:line - Run
colima start - Run
colima sshandlsto observe that the home directory is not mounted - Read the
colima.yamland observe that it reflectsmounts: null - Run
colima restart - Run
colima sshandlsto observe that the home directory is still not mounted
Expected behaviour
Upon colima start, when mounts: is not stated, the home directory should be mounted matching the behaviour stated in the config file, and the config file should be updated to mounts: [] (and that should have this behaviour).
# Colima default behaviour: $HOME is mounted as writable.
# Default: []
Additional context
I suspect this is a regression in v0.10.0 from #1485 as the condition for mounting the user's home directory was updated from len(conf.Mounts) == 0 (would be true where the mounts key is missing as it's unmarshaled into a nil slice that has len 0) to conf.Mounts != nil && len(conf.Mounts) == 0 (would be false as it's a nil slice)