Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon: Improve error msg for endpoint IP reallocation #10494

Merged
merged 1 commit into from Mar 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions daemon/state.go
Expand Up @@ -326,7 +326,7 @@ func (d *Daemon) allocateIPsLocked(ep *endpoint.Endpoint) error {
if option.Config.EnableIPv6 && ep.IPv6 != nil {
err = d.ipam.AllocateIP(ep.IPv6.IP(), ep.HumanStringLocked()+" [restored]")
if err != nil {
return fmt.Errorf("unable to reallocate IPv6 address: %s", err)
return fmt.Errorf("unable to reallocate %s IPv6 address: %s", ep.IPv6.IP(), err)
}

defer func() {
Expand All @@ -338,7 +338,7 @@ func (d *Daemon) allocateIPsLocked(ep *endpoint.Endpoint) error {

if option.Config.EnableIPv4 && ep.IPv4 != nil {
if err = d.ipam.AllocateIP(ep.IPv4.IP(), ep.HumanStringLocked()+" [restored]"); err != nil {
return fmt.Errorf("unable to reallocate IPv4 address: %s", err)
return fmt.Errorf("unable to reallocate %s IPv4 address: %s", ep.IPv4.IP(), err)
}
}

Expand Down