checkpoint: resolve symlink for external bind mount

runc resolves symlink before doing bind mount. So
we should save original path while formatting CriuReq for
checkpoint.

Signed-off-by: Liu Hua <weldonliu@tencent.com>
This commit is contained in:
Liu Hua
2021-04-13 11:22:58 +08:00
parent 2d38476c96
commit da22625f69
2 changed files with 15 additions and 1 deletions
+12 -1
View File
@@ -126,7 +126,18 @@ function simple_cr() {
done
}
@test "checkpoint and restore " {
@test "checkpoint and restore" {
simple_cr
}
@test "checkpoint and restore (bind mount, destination is symlink)" {
mkdir -p rootfs/real/conf
ln -s /real/conf rootfs/conf
update_config ' .mounts += [{
source: ".",
destination: "/conf",
options: ["bind"]
}]'
simple_cr
}