new-api: implement Pause() and Resume()
Signed-off-by: Andrey Vagin <avagin@openvz.org>
This commit is contained in:
parent
9586935441
commit
9c50d819ae
|
@ -48,6 +48,11 @@ func (c *linuxContainer) RunState() (configs.RunState, error) {
|
|||
return 0, err
|
||||
}
|
||||
|
||||
if c.config.Cgroups != nil &&
|
||||
c.config.Cgroups.Freezer == cgroups.Frozen {
|
||||
return configs.Paused, nil
|
||||
}
|
||||
|
||||
//FIXME get a cgroup state to check other states
|
||||
|
||||
return configs.Running, nil
|
||||
|
@ -163,13 +168,11 @@ func (c *linuxContainer) Destroy() error {
|
|||
}
|
||||
|
||||
func (c *linuxContainer) Pause() error {
|
||||
glog.Info("pause container")
|
||||
panic("not implemented")
|
||||
return c.cgroupManager.Freeze(cgroups.Frozen)
|
||||
}
|
||||
|
||||
func (c *linuxContainer) Resume() error {
|
||||
glog.Info("resume container")
|
||||
panic("not implemented")
|
||||
return c.cgroupManager.Freeze(cgroups.Thawed)
|
||||
}
|
||||
|
||||
func (c *linuxContainer) Signal(pid, signal int) error {
|
||||
|
|
Loading…
Reference in New Issue