mirror of
https://github.com/portainer/portainer.git
synced 2025-07-29 18:29:44 +02:00
fix(docker/swarm): suppress no such container logs (#10604)
This commit is contained in:
parent
3fd696d6b5
commit
e6ef913bb1
1 changed files with 6 additions and 1 deletions
|
@ -174,7 +174,12 @@ func snapshotContainers(snapshot *portainer.DockerSnapshot, cli *client.Client)
|
||||||
if !snapshot.Swarm {
|
if !snapshot.Swarm {
|
||||||
return err
|
return err
|
||||||
} else {
|
} else {
|
||||||
log.Info().Str("container", container.ID).Err(err).Msg("unable to inspect container in other Swarm nodes")
|
if !strings.Contains(err.Error(), "No such container") {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// It is common to have containers running on different Swarm nodes,
|
||||||
|
// so we just log the error in the debug level
|
||||||
|
log.Debug().Str("container", container.ID).Err(err).Msg("unable to inspect container in other Swarm nodes")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var gpuOptions *_container.DeviceRequest = nil
|
var gpuOptions *_container.DeviceRequest = nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue