Small fixes for #2950

We merged #2950 with some nits still remaining, as Giuseppe was
going on PTO. This addresses those small requested changes.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2019-05-01 15:07:30 -04:00
parent 7d05ff3fc7
commit 416cc20c68
4 changed files with 16 additions and 34 deletions

View File

@ -1,13 +1,14 @@
package libpod
import (
"context"
"path/filepath"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
func (r *Runtime) migrate() error {
func (r *Runtime) migrate(ctx context.Context) error {
runningContainers, err := r.GetRunningContainers()
if err != nil {
return err
@ -38,7 +39,7 @@ func (r *Runtime) migrate() error {
}
for _, ctr := range runningContainers {
if err := ctr.Start(r.ctx, true); err != nil {
if err := ctr.Start(ctx, true); err != nil {
logrus.Errorf("error restarting container %s", ctr.ID())
}
}