hyperhq / runv

Hypervisor-based Runtime for OCI
Apache License 2.0
828 stars 129 forks source link

Make VM dir private to avoid unnecessary propagation #461

Closed WeiZhang555 closed 7 years ago

WeiZhang555 commented 7 years ago

We need to make the /run/hyper/vm-xxxx/share_dir/container_id private before starting the container, or the mountpoint could propagate unexpectly, and makes devicemapper device busy to umount.

Also move some codes out from goroutine, because we need a certain process sequence to handle the clean works, goroutine can't gurantee the sequence, which sometime will leave trash in our system, this is quite bad.

Signed-off-by: Zhang Wei zhangwei555@huawei.com