-
Notifications
You must be signed in to change notification settings - Fork 16
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
The isolator should checkpoint mounts BEFORE the actual mount operation. #93
Comments
Your statement on the order of checkpointing occurring after the mount is correct Order is:
Note that the checkpoint record includes the munt location which is NOT deterministic and can only be recorded after the mount. The mountpoint is there to handle cases where multiple containers a=on the agent request the idetical volume. When this happens, the isolator needs to lookup the OS mountpoint for the bind mount. The design accepted the risk of a mount leak on the premise that pre-emptive mount would remedy this under the rare circumstance of a slave service crash. If we go with a checkpoint first model, the checkpoint would need to be a 2 phase approach of first recording only provider + volume name as a "tenatative mount" and then recording full details. The "tentative mount" info would be enough to do an unmount during recover() |
Do you need to checkpoint mount point location? Or you just need provider + volume. In other words, if your recovery just need provider + volume, why are you checkpointing the mount point (and other informations)? |
The bind mount needs the mount point location. Provider + volume is a usually unique identifier but is not sufficient to make a bind call by itself. It might be possible to make a query to the provider but this takes time - and may result in no response adding the complexity that you would want this asynchronous. And some providers, such as Amazon allow duplicate volume names, meaning that the query is only usually reliable as opposed to 100% reliable. Other information (mount options) was checkpointed for troubleshooting and for the possibility of warning generation should two containers request mount of the same volume with different options. This warning generation is not implemented at this time |
So to make it clear, when a second container arrives, requesting a mount of a volume that is already mounted and in use by another container, we need a way to determine the mount point location returned by the mount performed for the first container |
Just to clarify, that duplicated volume names sounds weird to me. What's the semantics? Say you mount the same volume name (same driver) twice, there'll be two mounts in the host mount table? What happens if I do a subsequent unmount? Will that unmount both? or just one of them? If just one of them, which one will be unmounted? Now I see that you need to checkpoint the mount points. Thanks for the explanation. |
I looked at the docker volume specification: /VolumeDriver.Mount It looks to me that the ref counting should be handled by the plugin (e.g., rexray), rather than the container runtime. The container runtime will simply call 'Mount' during container startup and 'Unmount' during container teardown. Given that, I am wondering why we are doing mount tracking in the isolator? |
The Docker engine does not keep track of state or mounted volume/container For example, what if the Docker engine crashes and along with it the The container runtime from our view should be the sole authority behind So we didn't necessarily do anything different with the spec. We On Friday, April 15, 2016, Jie Yu notifications@github.com wrote:
|
@clintonskitson that makes sense. Thanks for the explanation. |
Currently, the isolator checkpoints the mount AFTER doing the actual mount. The consequence of that if the slave crashes after doing the mount before the checkpointing, it loses track of that mount during recovery. One obvious issue is mount leaking. There might be other issues.
The text was updated successfully, but these errors were encountered: