Skip to content

Commit bb6aeed

Browse files
authored
Merge pull request #4440 from yangzhao02/main
Terminate execution for criu that does not meet version requirements
2 parents 82bf6d1 + 324fcea commit bb6aeed

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)