mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-05 15:37:02 +08:00
Merge pull request #4696 from avagin/criu-vs-exec
criu: Add time namespace to container config after checkpoint/restore
This commit is contained in:
@@ -1151,6 +1151,13 @@ func (c *Container) criuNotifications(resp *criurpc.CriuResp, process *Process,
|
||||
}
|
||||
// create a timestamp indicating when the restored checkpoint was started
|
||||
c.created = time.Now().UTC()
|
||||
if !c.config.Namespaces.Contains(configs.NEWTIME) &&
|
||||
configs.IsNamespaceSupported(configs.NEWTIME) &&
|
||||
c.checkCriuVersion(31400) == nil {
|
||||
// CRIU restores processes into a time namespace.
|
||||
c.config.Namespaces = append(c.config.Namespaces,
|
||||
configs.Namespace{Type: configs.NEWTIME})
|
||||
}
|
||||
if _, err := c.updateState(r); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user