Return the runtime error message on failed pause and resume calls

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-03-29 11:40:05 -07:00
parent aa976325f5
commit fd888e8f34
2 changed files with 12 additions and 4 deletions

View file

@ -23,7 +23,7 @@ func (s *Supervisor) updateContainer(t *UpdateTask) error {
switch t.State {
case runtime.Running:
if err := container.Resume(); err != nil {
return ErrUnknownContainerStatus
return err
}
s.notifySubscribers(Event{
ID: t.ID,
@ -32,7 +32,7 @@ func (s *Supervisor) updateContainer(t *UpdateTask) error {
})
case runtime.Paused:
if err := container.Pause(); err != nil {
return ErrUnknownContainerStatus
return err
}
s.notifySubscribers(Event{
ID: t.ID,