mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-02 02:02:24 +00:00
Merge pull request #1126 from jcvenegas/allow-update-on-ready
update: allow do update on ready.
This commit is contained in:
commit
6c3277e013
@ -165,8 +165,8 @@ other options are ignored.
|
||||
span.SetTag("sandbox", sandboxID)
|
||||
|
||||
// container MUST be running
|
||||
if status.State.State != types.StateRunning {
|
||||
return fmt.Errorf("Container %s is not running", containerID)
|
||||
if state := status.State.State; !(state == types.StateRunning || state == types.StateReady) {
|
||||
return fmt.Errorf("Container %s is not running or Ready, the state is %s", containerID, state)
|
||||
}
|
||||
|
||||
r := specs.LinuxResources{
|
||||
|
@ -1029,8 +1029,8 @@ func (c *Container) update(resources specs.LinuxResources) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if c.state.State != types.StateRunning {
|
||||
return fmt.Errorf("Container not running, impossible to update")
|
||||
if state := c.state.State; !(state == types.StateRunning || state == types.StateReady) {
|
||||
return fmt.Errorf("Container(%s) not running or ready, impossible to update", state)
|
||||
}
|
||||
|
||||
if c.config.Resources.CPU == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user