Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent storage of recorded data #5

Open
docwhat opened this issue Jan 8, 2017 · 0 comments
Open

Persistent storage of recorded data #5

docwhat opened this issue Jan 8, 2017 · 0 comments

Comments

@docwhat
Copy link
Owner

docwhat commented Jan 8, 2017

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant