logging + networking fix
This commit is contained in:
1 parent
092ef6185f
commit
563dd7a759
4 files changed
+21
-4
No files matched your search
@@ -110,6 +110,7 @@ func (m *Manager) Migrate(ctx context.Context, id string, opts MoveOptions) (*Mo
|
||||
_ = src.CloseExport(context.Background(), e)
|
||||
}
|
||||
if stopped {
|
||||
log.Printf("container: restarting %s on %s after a failed move", u.Machine, u.Node)
|
||||
if err := src.Start(context.Background(), m.spec(u)); err != nil {
|
||||
return res, fmt.Errorf("%w (and restarting it on %s failed: %v)", cause, u.Node, err)
|
||||
}
|
||||
@@ -151,6 +152,7 @@ func (m *Manager) Migrate(ctx context.Context, id string, opts MoveOptions) (*Mo
|
||||
if opts.WaitIdle != nil {
|
||||
opts.WaitIdle(ctx)
|
||||
}
|
||||
log.Printf("container: shutting down %s on %s to move it to %s", u.Machine, u.Node, target)
|
||||
if err := src.Poweroff(ctx, u.Machine); err != nil {
|
||||
return rollback(err)
|
||||
}
|
||||
@@ -185,6 +187,7 @@ func (m *Manager) Migrate(ctx context.Context, id string, opts MoveOptions) (*Mo
|
||||
return res, nil
|
||||
}
|
||||
progress(PhaseStart, copied)
|
||||
log.Printf("container: starting %s on %s after the move from %s", u.Machine, target, oldNode)
|
||||
if err := dst.Start(ctx, m.spec(u)); err != nil {
|
||||
return res, fmt.Errorf("moved to %s, but starting it there failed: %w", target, err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user