While there's not much we can do if we failed to store a snapshot of the
container's state, let's log the error in case it happens in stad of discarding.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -87,7 +87,12 @@ func (daemon *Daemon) killWithSignal(container *containerpkg.Container, stopSign |
| 87 | 87 |
|
| 88 | 88 |
if !daemon.IsShuttingDown() {
|
| 89 | 89 |
container.HasBeenManuallyStopped = true |
| 90 |
- container.CheckpointTo(daemon.containersReplica) |
|
| 90 |
+ if err := container.CheckpointTo(daemon.containersReplica); err != nil {
|
|
| 91 |
+ log.G(context.TODO()).WithFields(log.Fields{
|
|
| 92 |
+ "error": err, |
|
| 93 |
+ "container": container.ID, |
|
| 94 |
+ }).Warn("error checkpointing container state")
|
|
| 95 |
+ } |
|
| 91 | 96 |
} |
| 92 | 97 |
|
| 93 | 98 |
// if the container is currently restarting we do not need to send the signal |