Yanqiang Miao
c65921b16a
Get the mountInfo by 'LookupMount' in containerd
...
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-10-12 11:09:24 +08:00
Lantao Liu
6cb3d27ed3
Use device number to find uuid
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-10-09 06:10:43 +00:00
Lantao Liu
a7b78d7622
Merge pull request #297 from ijc/use-stat-for-device-uuid-comparison
...
Use stat_t.st_rdev to compare block devices
2017-09-28 11:30:34 -07:00
Lantao Liu
517f697f62
Better format several errors
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-28 01:15:06 +00:00
Ian Campbell
11714fb6a3
Use stat_t.st_rdev to compare block devices
...
I implemented /dev/disk/by-uuid on my platform but using absolute links (where
udev typically uses relative) which broke the code in `os.DeviceUUID`.
Rather than just patch that up directly instead stat both the target and
candidate devices and pick one with matching major:minor in st_rdev. This saves
manually building paths to resolve symlinks and I think should be more robust
overall.
I also removed the initial stat of /dev/disk/by-uuid, I believe
`ioutil.Readdir` will correctly return an error if the path does not exist.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-27 16:17:57 +01:00
Lantao Liu
491400c892
Add ImageFsInfo support
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-09-25 21:02:29 +00:00
Yanqiang Miao
49eb38a5d4
Ensure the mount point is propagated
...
mount with `rshared`, the host path should be shared.
mount with `rslave`, the host pash should be shared or slave.
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-09-19 14:21:21 +08:00
Ian Campbell
e0079125d2
Move resolveSymbolicLink to OS package and stub out for tests
...
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-09-15 11:25:45 +01:00
Lantao Liu
7f9e0262ad
Unmount /dev/shm when stop sandbox.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-16 17:18:14 +00:00
Mike Brown
484a326717
modify code to compile on updated containerd
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2017-06-15 23:14:21 +00:00
Lantao Liu
9d5990fe4f
Add sandbox /dev/shm.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-11 09:49:46 +00:00
Lantao Liu
5398a3b7ec
Add mount/unmount in os interface
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-11 09:23:04 +00:00
Crazykev
9bf7ffd51a
generate and maintain resolv.conf for sandbox
...
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2017-06-09 19:36:30 +08:00
Lantao Liu
88f4c252d6
Add sandbox /etc/hosts when using host network
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-06-06 06:43:38 +00:00
Xianglin Gao
4a4414987f
Add unit test
...
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2017-05-23 18:30:20 +08:00
Xianglin Gao
6d2b9fabca
And setup and teardown
...
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2017-05-23 15:17:40 +08:00
Random-Liu
bf28c7fc75
Add initial sandbox management implementation
...
Signed-off-by: Random-Liu <lantaol@google.com>
2017-05-12 13:14:11 -07:00
Random-Liu
f61c974faf
Add OS interface and fake implementation.
...
Signed-off-by: Random-Liu <lantaol@google.com>
2017-05-03 16:55:28 -07:00