1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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>
This commit is contained in:
Sebastiaan van Stijn 2020-05-25 14:43:40 +02:00
parent e5a679cfd2
commit 288ed93dc5
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -536,7 +536,7 @@ func (daemon *Daemon) allocateNetwork(container *container.Container) error {
// Cleanup any stale sandbox left over due to ungraceful daemon shutdown // Cleanup any stale sandbox left over due to ungraceful daemon shutdown
if err := controller.SandboxDestroy(container.ID); err != nil { 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() { if container.Config.NetworkDisabled || container.HostConfig.NetworkMode.IsContainer() {