dotmesh-io / dotmesh

dotmesh (dm) is like git for your data volumes (databases, files etc) in Docker and Kubernetes
https://dotmesh.com
Apache License 2.0
539 stars 29 forks source link

Undo snapshot mounts when we need to be rid of them #708

Closed alaric-dotmesh closed 5 years ago

alaric-dotmesh commented 5 years ago

In at least two circumstances we can think of - rolling back a merge, or deleting a dot - the presence of snapshot mounts causes the operation to fail as the "dataset is busy".

When doing a rollback or a deletion, we should unmount snapshot mounts. For a rollback, we just need mounts of snapshots we're rolling back (snapshots from BEFORE the rollback point don't need unmounting); for deletion, they all need to go.

Whether we keep track of snapshot mounts we create in-memory, or scan the mount table to find them (which is more restart-safe), is open to debate.

alaric-dotmesh commented 5 years ago

Merged into https://github.com/dotmesh-io/gateway/issues/121