File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -780,6 +780,9 @@ const descriptorsFilename = "descriptors.json"
780780
781781func (c * linuxContainer ) addCriuDumpMount (req * criurpc.CriuReq , m * configs.Mount ) {
782782 mountDest := strings .TrimPrefix (m .Destination , c .config .Rootfs )
783+ if dest , err := securejoin .SecureJoin (c .config .Rootfs , mountDest ); err == nil {
784+ mountDest = dest [len (c .config .Rootfs ):]
785+ }
783786 extMnt := & criurpc.ExtMountMap {
784787 Key : proto .String (mountDest ),
785788 Val : proto .String (mountDest ),
Original file line number Diff line number Diff line change @@ -126,7 +126,18 @@ function simple_cr() {
126126 done
127127}
128128
129- @test " checkpoint and restore " {
129+ @test " checkpoint and restore" {
130+ simple_cr
131+ }
132+
133+ @test " checkpoint and restore (bind mount, destination is symlink)" {
134+ mkdir -p rootfs/real/conf
135+ ln -s /real/conf rootfs/conf
136+ update_config ' .mounts += [{
137+ source: ".",
138+ destination: "/conf",
139+ options: ["bind"]
140+ }]'
130141 simple_cr
131142}
132143
You can’t perform that action at this time.
0 commit comments