Browse Source

daemon.allocateNetwork: include original error in logs

When failing to destroy a stale sandbox, we logged that the removal
failed, but omitted the original error message.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 5 years ago
parent
commit
288ed93dc5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      daemon/container_operations.go

+ 1 - 1
daemon/container_operations.go

@@ -536,7 +536,7 @@ func (daemon *Daemon) allocateNetwork(container *container.Container) error {
 
 	// Cleanup any stale sandbox left over due to ungraceful daemon shutdown
 	if err := controller.SandboxDestroy(container.ID); err != nil {
-		logrus.Errorf("failed to cleanup up stale network sandbox for container %s", container.ID)
+		logrus.WithError(err).Errorf("failed to cleanup up stale network sandbox for container %s", container.ID)
 	}
 
 	if container.Config.NetworkDisabled || container.HostConfig.NetworkMode.IsContainer() {