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.
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