daemon: ContainerRename: move log args to log fields
Also, err `e` is renamed into the more standard `err` as the defer
already uses `retErr` to avoid clashes (changed in f5a611a74
).
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
parent
35eba19a65
commit
b1676a289c
1 changed files with 5 additions and 2 deletions
|
@ -102,8 +102,11 @@ func (daemon *Daemon) ContainerRename(oldName, newName string) (retErr error) {
|
|||
if retErr != nil {
|
||||
container.Name = oldName
|
||||
container.NetworkSettings.IsAnonymousEndpoint = oldIsAnonymousEndpoint
|
||||
if e := container.CheckpointTo(daemon.containersReplica); e != nil {
|
||||
log.G(context.TODO()).Errorf("%s: Failed in writing to Disk on rename failure: %v", container.ID, e)
|
||||
if err := container.CheckpointTo(daemon.containersReplica); err != nil {
|
||||
log.G(context.TODO()).WithFields(log.Fields{
|
||||
"containerID": container.ID,
|
||||
"error": err,
|
||||
}).Error("failed to write container state to disk during rename")
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Add table
Reference in a new issue