Skip to content

Persistent storage of recorded data #5

@docwhat

Description

@docwhat

I've been trying to figure out how to make persistent storage "safe".

In the current model I track a timestamp for when an image was last seen by docker-gc. These timestamps are updated when:

  • On startup, we scan all images (e.g. docker image --all)
  • As events mention an image.
  • Just prior to deleting old images, all container images are added.

The startup rule causes problems when persisting the state:

  1. If we reset all timestamps on startup, then there is no advantage to persisting. All images have their timestamp reset.
  2. If we don't, then events could have happened while docker-gc wasn't running and it could decide to remove things that are being used.

If we add cleaning of stopped containers (#3) then this gets even more tricky.

Another concern is removing items that aren't in docker anymore (e.g. images that have been docker rmi'd).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions