This repository was archived by the owner on May 12, 2021. It is now read-only.
mounts: Add check for system volumes#1418
Merged
amshinde merged 2 commits intokata-containers:masterfrom Apr 12, 2019
Merged
Conversation
Member
amshinde
commented
Mar 25, 2019
We handle system directories differently, if its a bind mount we mount the guest system directory to the container mount and skip the 9p share mount. However, we should not do this for docker volumes which are directories created by Docker. This introduces a Docker specific check, but that is the only information available to us at the OCI layer. Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
k8s host empty-dir is equivalent to docker volumes. For this case, we should just use the host directory even for system directories. Move the isEphemeral function to virtcontainers to not introduce cyclic dependency. Fixes kata-containers#1417 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Member
Member
|
/retest |
|
fixes #1472 ? |
jcvenegas
reviewed
Apr 10, 2019
| } | ||
|
|
||
| const ( | ||
| dockerVolumePrefix = "/var/lib/docker/volumes" |
Member
There was a problem hiding this comment.
It would be great to check where is defined this is docker code just to add as a comment reference in case it changes in the future.
Member
There was a problem hiding this comment.
var/lib/docker is configurable at docker startup I may check only from volumes
| func isEmptyDir(path string) bool { | ||
| splitSourceSlice := strings.Split(path, "/") | ||
| if len(splitSourceSlice) > 1 { | ||
| storageType := splitSourceSlice[len(splitSourceSlice)-2] |
| } | ||
|
|
||
| func TestIsDockerVolume(t *testing.T) { | ||
| path := "/var/lib/docker/volumes/00da1347c7cf4f15db35f/_data" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.