Skip to content

Commit 324fcea

Browse files
committed
Terminate execution for criu that does not meet version requirements
Signed-off-by: yangzhao.hjh <[email protected]>
1 parent 9112335 commit 324fcea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcontainer/criu_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ func criuNsToKey(t configs.NamespaceType) string {
186186

187187
func (c *Container) handleCheckpointingExternalNamespaces(rpcOpts *criurpc.CriuOpts, t configs.NamespaceType) error {
188188
if !c.criuSupportsExtNS(t) {
189-
return nil
189+
return fmt.Errorf("criu lacks support for external %s namespace during checkpointing process (old criu version?)", configs.NsName(t))
190190
}
191191

192192
nsPath := c.config.Namespaces.PathOf(t)
@@ -246,7 +246,7 @@ func (c *Container) handleRestoringNamespaces(rpcOpts *criurpc.CriuOpts, extraFi
246246

247247
func (c *Container) handleRestoringExternalNamespaces(rpcOpts *criurpc.CriuOpts, extraFiles *[]*os.File, t configs.NamespaceType) error {
248248
if !c.criuSupportsExtNS(t) {
249-
return nil
249+
return fmt.Errorf("criu lacks support for external %s namespace during the restoration process (old criu version?)", configs.NsName(t))
250250
}
251251

252252
nsPath := c.config.Namespaces.PathOf(t)

0 commit comments

Comments
 (0)