Skip to content

Add container-engine.moby-storage-driver setting #9732

Description

@jandubois

The problem

In Rancher Desktop 1.21 we automatically switch to using the containerd-snapshotter with Moby on a new install or after a factory reset. We detect this situation by checking if /etc/docker/daemon.json already exists or not.

The problem is that on Windows we don't persist /etc/docker during upgrades, so every existing setup has been switching to the snapshotter even if there are existing images stored under the classic storage driver. The existing images are not deleted, just inaccessible.

The fix (so far)

We have a partial fix for this in #9666, which checks if /var/lib/docker/image/overlay2 exists, even when /etc/docker/daemon.json doesn't.

This fix is incomplete: if a user has updated images using the snapshotter, they will still be unconditionally reverted back to the classic storage driver (and their old images) when they upgrade to 1.22.

We need to give control to the user

A user may now have both images in the classic storage driver, and in the snapshotter. We already had this situation with the Wasm option, which also switched to the snapshotter storage driver, leaving other images behind.

We need to provide a setting to let the user switch back and forth between storage drivers. The Wasm option used to do that, but now are using the snapshotter even if Wasm is disabled.

Proposal

We add containerEngine.mobyStorageDriver with 3 settings:

  • classic to use the classic storage driver unconditionally
  • snapshotter to use the snapshotter unconditionally
  • empty string (default) uses the snapshotter, if the Wasm option is enabled, or if there is any image data stored by the snapshotter, or if there is no data stored by the classic driver. Otherwise it will use the classic driver.

This setting is ignored if the user is not using the moby container engine.

There will be no UI support for this option; it can only be set by rdctl.

Then we add diagnostics (in #9733) to show the user if they have any image data stored by the storage driver they are not currently using.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions