|
@@ -74,8 +74,8 @@ func (daemon *Daemon) ContainersPrune(ctx context.Context, pruneFilters filters.
|
|
|
for _, c := range allContainers {
|
|
|
select {
|
|
|
case <-ctx.Done():
|
|
|
- logrus.Warnf("ContainersPrune operation cancelled: %#v", *rep)
|
|
|
- return rep, ctx.Err()
|
|
|
+ logrus.Debugf("ContainersPrune operation cancelled: %#v", *rep)
|
|
|
+ return rep, nil
|
|
|
default:
|
|
|
}
|
|
|
|
|
@@ -121,7 +121,7 @@ func (daemon *Daemon) VolumesPrune(ctx context.Context, pruneFilters filters.Arg
|
|
|
pruneVols := func(v volume.Volume) error {
|
|
|
select {
|
|
|
case <-ctx.Done():
|
|
|
- logrus.Warnf("VolumesPrune operation cancelled: %#v", *rep)
|
|
|
+ logrus.Debugf("VolumesPrune operation cancelled: %#v", *rep)
|
|
|
return ctx.Err()
|
|
|
default:
|
|
|
}
|
|
@@ -153,6 +153,9 @@ func (daemon *Daemon) VolumesPrune(ctx context.Context, pruneFilters filters.Arg
|
|
|
}
|
|
|
|
|
|
err = daemon.traverseLocalVolumes(pruneVols)
|
|
|
+ if err == context.Canceled {
|
|
|
+ return rep, nil
|
|
|
+ }
|
|
|
|
|
|
return rep, err
|
|
|
}
|
|
@@ -303,8 +306,7 @@ deleteImagesLoop:
|
|
|
}
|
|
|
|
|
|
if canceled {
|
|
|
- logrus.Warnf("ImagesPrune operation cancelled: %#v", *rep)
|
|
|
- return nil, ctx.Err()
|
|
|
+ logrus.Debugf("ImagesPrune operation cancelled: %#v", *rep)
|
|
|
}
|
|
|
|
|
|
return rep, nil
|
|
@@ -320,6 +322,7 @@ func (daemon *Daemon) localNetworksPrune(ctx context.Context, pruneFilters filte
|
|
|
l := func(nw libnetwork.Network) bool {
|
|
|
select {
|
|
|
case <-ctx.Done():
|
|
|
+ // context cancelled
|
|
|
return true
|
|
|
default:
|
|
|
}
|
|
@@ -370,7 +373,7 @@ func (daemon *Daemon) clusterNetworksPrune(ctx context.Context, pruneFilters fil
|
|
|
for _, nw := range networks {
|
|
|
select {
|
|
|
case <-ctx.Done():
|
|
|
- return rep, ctx.Err()
|
|
|
+ return rep, nil
|
|
|
default:
|
|
|
if nw.Ingress {
|
|
|
// Routing-mesh network removal has to be explicitly invoked by user
|
|
@@ -427,8 +430,8 @@ func (daemon *Daemon) NetworksPrune(ctx context.Context, pruneFilters filters.Ar
|
|
|
|
|
|
select {
|
|
|
case <-ctx.Done():
|
|
|
- logrus.Warnf("NetworksPrune operation cancelled: %#v", *rep)
|
|
|
- return nil, ctx.Err()
|
|
|
+ logrus.Debugf("NetworksPrune operation cancelled: %#v", *rep)
|
|
|
+ return rep, nil
|
|
|
default:
|
|
|
}
|
|
|
|