-
Notifications
You must be signed in to change notification settings - Fork 144
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
runtimetest: fix mounts check #392
Merged
liangchenye
merged 1 commit into
opencontainers:master
from
Mashimiao:skip-bind-mount-check
Jul 12, 2017
Merged
runtimetest: fix mounts check #392
liangchenye
merged 1 commit into
opencontainers:master
from
Mashimiao:skip-bind-mount-check
Jul 12, 2017
Conversation
This file contains 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
ping @opencontainers/runtime-tools-maintainers |
I think I am okay with this. I will let other maintainers chime in as well. |
bind and rbind are still not covered by the spec
(opencontainers/runtime-spec#771), but it would be good to figure out
how we plan on testing them once they are. The “check after” approach
would probably involve a special test in validation_test.go where we
setup a custom config and source filesystem, run ‘create’, create new
files in the mounted filesystems, and check for the expected
propagation. The “check during” approach would be to ptrace(2) the
`create` process and look for the expected mount(2) calls. But I
don't see a good way to handle these checks in a generic runtimetest
way, since we don't have much information about the initial filesystem
in that case. Unless we *do* have plans for a generic runtimetest
approach, I'd rather silently skip (r)bind mount entries in
runtimetest instead of warning about the skips. Or maybe use Debugf
instead of Warnf if you don't want to be completely silent.
Also note that opencontainers/runtime-spec#771 (which I hope will get
revived before 1.0, and is currently blocked by
opencontainers/runc#1460) is not using ‘type’ for (r)bind [1]. I
think runtimetest would be more robust if it switched on the presence
of (r)bind options [2,3] for whatever logic we end up using. Also
note that move [4], private [5], etc. are probably going to need the
same sort of handling that we give (r)bind.
[1]: https://github.com/opencontainers/runtime-spec/pull/771/files#diff-c9c91c29b41257aea3a3403cc606ad99R65
[2]: https://github.com/opencontainers/runtime-spec/pull/771/files#diff-c9c91c29b41257aea3a3403cc606ad99R81
[3]: https://github.com/opencontainers/runtime-spec/pull/771/files#diff-c9c91c29b41257aea3a3403cc606ad99R104
[4]: https://github.com/opencontainers/runtime-spec/pull/771/files#diff-c9c91c29b41257aea3a3403cc606ad99R91
[5]: https://github.com/opencontainers/runtime-spec/pull/771/files#diff-c9c91c29b41257aea3a3403cc606ad99R103
|
I don't think it is necessary to add this warning. |
Even if bind mount succeed, there will not any bind or rbind key word in type of options of mount. So, we can not make sure if bind mount succeed. It'd better to skip bind mount check Signed-off-by: Ma Shimiao <[email protected]>
475ef2c
to
7ab0fc8
Compare
@liangchenye OK, I'm fine with adding TODO. we may add it after #391 landed. |
updated, @mrunalp @liangchenye @hqhq PTAL |
1 similar comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Even if bind mount succeed, there will not any bind or rbind key word
in type of options of mount.
So, we can not make sure if bind mount succeed.
It'd better to skip bind mount check
Signed-off-by: Ma Shimiao [email protected]