abiosoft/colima · error

empty runtime

Error message

empty runtime

What it means

monitorContainerVolumes requires a container runtime name in f.runtime (populated from Args.Runtime / --inotify-runtime). Empty string aborts immediately, before the 5-second polling goroutine starts — this is the raw check that error 104 wraps. Note the switch has no default: any runtime name other than docker/containerd silently produces no volumes rather than an error.

Source

Thrown at daemon/process/inotify/volumes.go:20

import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"sort"
	"strings"
	"time"

	"github.com/abiosoft/colima/environment/container/containerd"
	"github.com/abiosoft/colima/environment/container/docker"
)

func (f *inotifyProcess) monitorContainerVolumes(ctx context.Context, c chan<- []string) error {
	log := f.log

	if f.runtime == "" {
		return fmt.Errorf("empty runtime")
	}

	fetch := func() ([]string, error) {
		var vols []string

		switch f.runtime {

		case docker.Name:
			vols, err := f.fetchVolumes(docker.Name)
			if err != nil {
				return nil, fmt.Errorf("error fetching docker volumes: %w", err)
			}
			return vols, nil

		case containerd.Name:
			var namespaces []string
			out, err := f.guest.RunOutput("sudo", "nerdctl", "namespace", "list", "-q")
			if err != nil {

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. always pass --inotify-runtime docker or --inotify-runtime containerd when enabling --inotify
  2. stick to the two recognized runtime names — they are the only branches in volumes.go
  3. upgrade colima if the standard `colima start --mount-inotify` path leaves the runtime empty

Example fix

// before
colima daemon start default --inotify            // runtime empty

// after
colima daemon start default --inotify --inotify-runtime containerd
Defensive patterns

Strategy: validation

Validate before calling

switch args.Runtime {
case docker.Name, containerd.Name:
default:
    return fmt.Errorf("unsupported inotify runtime %q (want docker|containerd)", args.Runtime)
}
f.runtime = args.Runtime

Type guard

func supportedRuntime(r string) bool { return r == docker.Name || r == containerd.Name }

Try / catch

if err := f.monitorContainerVolumes(ctx, vols); err != nil {
    if strings.Contains(err.Error(), "empty runtime") {
        return fmt.Errorf("inotify misconfigured: set --inotify-runtime") // config error, no retry
    }
}

Prevention

When it happens

Trigger: the daemon's inotify process constructed/started with Runtime=""; context Args missing the Runtime field; custom embedding of the inotify process without wiring the flag.

Common situations: manual daemon invocations skipping --inotify-runtime; colima versions or wrappers that forward an empty runtime; test harnesses reusing inotify.New() directly.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/61fb2036cae5f8f6. Report an issue: GitHub.