Uh oh!
There was an error while loading. Please reload this page.
add bundle validate as sub-command - #20
Conversation
Signed-off-by: liangchenye <liangchenye@huawei.com>
mrunalp
commented
Feb 8, 2016
Thanks for the PR. I am on vacation and will be slow in responding till next week. |
Signed-off-by: liangchenye <liangchenye@huawei.com>
Signed-off-by: liangchenye <liangchenye@huawei.com>
liangchenye
commented
Feb 23, 2016
@mrunalp bundle validate is updated to 0.3.0 |
mrunalp
commented
Feb 23, 2016
Build failure as you need to bump up the spec to 0.3.0 in Godeps. Thanks! |
Signed-off-by: liangchenye <liangchenye@huawei.com>
liangchenye
commented
Feb 23, 2016
Godeps updated. The config.json generated by ocitools could not pass the bundle validation, since three security fields are not noted as 'optional', I submit a PR here (opencontainers/runtime-spec#325) |
liangchenye
commented
Feb 23, 2016
Opps, the codes under cmd directory should also need to be changed. |
Signed-off-by: liangchenye <liangchenye@huawei.com>
liangchenye
commented
Feb 23, 2016
cmd updated. |
mrunalp
commented
Mar 8, 2016
Can you update the deps to pickup the change where selinuxlabel and apparmor got moved to proces? |
mrunalp
commented
Mar 8, 2016
Also, we need to make seccomp optional in the spec. Otherwise this seems to be working well. |
mrunalp
commented
Mar 8, 2016
I have created PR for seccomp opencontainers/runtime-spec#333 |
mrunalp
commented
Mar 8, 2016
I think we can merge this for now and fix up things in follow up PRs. Thanks! LGTM |
add bundle validate as sub-command
liangchenye
commented
Mar 8, 2016
Yes, I'll update all of the selinuxlabel/apparmor/seccomp Godeps once |
These landed as CheckMounts in 647e355 (bundle validate update to 0.3.0, 2016-02-23, opencontainers#20), but both checks are too strict. The first (destination exists in the rootfs) errors on valid cases like: "mounts": [ { "source": "users", "destination": "/home", "type": "bind" }, { "source": "none", "destination": "/home/wking", "type": "tmpfs" } ] Where the source 'users' directory already contained a 'wking' subdirectory. So by the time the tmpfs was setup, the destination directory would exist, but at validation time (without having run the bind mount) the tmpfs destination directory would not exist. The second (destination is a directory) errors on valid cases like: "mounts": [ { "source": "/etc/resolv.conf", "destination": "/etc/resolv.conf", "type": "bind" } ] because binding files to files works. In a shell: # touch test # mount --bind /etc/resolv.conf test # umount test However binding directories to files does not work: # mount --bind /etc test mount: mount point /tmp/test is not a directory Figuring out which mount configurations are valid and which aren't may be possible, but I'm pretty sure it's more trouble than we want to get into. There may be room for other mount tests (e.g. comparing 'type' against /proc/filesystems as a host-specific test), but I'm leaving those to subsequent pull requests. Signed-off-by: W. Trevor King <wking@tremily.us>
These landed as CheckMounts in 647e355 (bundle validate update to 0.3.0, 2016-02-23, #20), but both checks are too strict. The first (destination exists in the rootfs) errors on valid cases like: "mounts": [ { "source": "users", "destination": "/home", "type": "bind" }, { "source": "none", "destination": "/home/wking", "type": "tmpfs" } ] Where the source 'users' directory already contained a 'wking' subdirectory. So by the time the tmpfs was setup, the destination directory would exist, but at validation time (without having run the bind mount) the tmpfs destination directory would not exist. The second (destination is a directory) errors on valid cases like: "mounts": [ { "source": "/etc/resolv.conf", "destination": "/etc/resolv.conf", "type": "bind" } ] because binding files to files works. In a shell: # touch test # mount --bind /etc/resolv.conf test # umount test However binding directories to files does not work: # mount --bind /etc test mount: mount point /tmp/test is not a directory Figuring out which mount configurations are valid and which aren't may be possible, but I'm pretty sure it's more trouble than we want to get into. There may be room for other mount tests (e.g. comparing 'type' against /proc/filesystems as a host-specific test), but I'm leaving those to subsequent pull requests. Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: liangchenye liangchenye@huawei.com
Clean the worthless commits in (#4) and re-submit it.