Fix name collision handling in restore
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> Upstream-commit: a9c1575b1a248305290731ade24eab784ff95d55 Component: engine
This commit is contained in:
@ -152,13 +152,15 @@ func (daemon *Daemon) restore() error {
|
||||
removeContainers := make(map[string]*container.Container)
|
||||
restartContainers := make(map[*container.Container]chan struct{})
|
||||
activeSandboxes := make(map[string]interface{})
|
||||
for _, c := range containers {
|
||||
for id, c := range containers {
|
||||
if err := daemon.registerName(c); err != nil {
|
||||
logrus.Errorf("Failed to register container %s: %s", c.ID, err)
|
||||
delete(containers, id)
|
||||
continue
|
||||
}
|
||||
if err := daemon.Register(c); err != nil {
|
||||
logrus.Errorf("Failed to register container %s: %s", c.ID, err)
|
||||
delete(containers, id)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user