Skip to content

Unprivileged LXD containers with large filesets takes hours to start #3880

@divanikus

Description

@divanikus

Description
LXD driver does not honor LXD idmap values which causes full disk remapping on each start. While it is not a problem on a small fileset, it causes really huge time to start a container with a large fileset.

The problem lies within two values in the container's config, which are
config.volatile.idmap.next
config.volatile.last_state.idmap

If one of these is empty, but the container has an idmap, it causes LXD to run a full remap of all underlying disks. On a large fileset (millions of files) it is a costly operation and might take hours to complete.

To Reproduce
Steps to reproduce the behavior.

  1. Create a regular container
  2. Add LOTS of files into it
  3. Stop the container
  4. Try to start it again

Expected behavior
If those values are maintained properly, container starts immediately.

Details

  • Affected Component: VMM
  • Hypervisor: LXD
  • Version: 5.8.4

Suggestion
I think that LXD driver should save the successful config somewhere and reuse it's values to rebuild newer deployments.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions