abiosoft/colima · error
error watching container volumes: %w
Error message
error watching container volumes: %w
What it means
handleEvents (the inotify event loop) begins by calling monitorContainerVolumes, which only fails synchronously when f.runtime is empty — everything else happens inside a polling goroutine that logs instead of returning. So this wrapper in practice means the inotify process was started without a runtime: the daemon ran with --inotify but Args.Runtime/--inotify-runtime was empty.
Source
Thrown at daemon/process/inotify/events.go:25
"time"
)
type modEvent struct {
path string // filename
fs.FileMode
}
func (m modEvent) Mode() string { return fmt.Sprintf("%o", m.FileMode) }
func (f *inotifyProcess) handleEvents(ctx context.Context, watcher dirWatcher) error {
log := f.log
log.Trace("begin inotify event handler")
mod := make(chan modEvent)
vols := make(chan []string)
if err := f.monitorContainerVolumes(ctx, vols); err != nil {
return fmt.Errorf("error watching container volumes: %w", err)
}
var last time.Time
var cancelWatch context.CancelFunc
var currentVols []string
volsChanged := func(vols []string) bool {
if len(currentVols) != len(vols) {
return true
}
for i := range vols {
if vols[i] != currentVols[i] {
return true
}
}
return false
}
View on GitHub (pinned to c3a5f9184d)
Solutions
- pass the runtime explicitly: colima daemon start <profile> --inotify --inotify-runtime docker (or containerd)
- if reached via normal `colima start --mount-inotify`, upgrade colima — the CLI is responsible for setting the flag
- verify conf.Runtime in the profile config names a supported runtime (docker or containerd)
Example fix
// before $ colima daemon start default --inotify error watching container volumes: empty runtime // after $ colima daemon start default --inotify --inotify-runtime docker
Defensive patterns
Strategy: validation
Validate before calling
if runtime := conf.Runtime; runtime != docker.Name && runtime != containerd.Name {
return fmt.Errorf("--mount-inotify needs runtime docker or containerd, got %q", runtime)
} Type guard
func isInotifyRuntimeErr(err error) bool {
return err != nil && strings.Contains(err.Error(), "error watching container volumes")
} Try / catch
if err := proc.Start(ctx); err != nil {
if strings.Contains(err.Error(), "empty runtime") {
// configuration bug: re-invoke with --inotify-runtime; do not retry as-is
}
} Prevention
- always pair --inotify with --inotify-runtime docker|containerd in manual daemon calls
- rely on `colima start --mount-inotify` rather than driving `colima daemon` by hand
- unit-test Args wiring so Runtime is never empty when the process starts
When it happens
Trigger: starting the daemon process with `--inotify` but without `--inotify-runtime` (the CLI flag defaults to "docker", so this points to programmatic invocation or a version that fails to forward the flag); calling inotifyProcess.Start with Args{Runtime: ""}.
Common situations: custom scripts invoking `colima daemon start <profile> --inotify` manually; automation that drops flags; mismatched colima/daemon versions after a partial upgrade.
Related errors
- error sanitising mount path for inotify: %w
- inotify not running
- empty runtime
- error setting up inotify dependencies: %w
- 'colima model' requires docker runtime, current runtime is %
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/a5bb5ece8b8c1a98.
Report an issue: GitHub.