Skip to content

"network XXX has active endpoints" error should account for empty endpoint names #49888

@thaJeztah

Description

@thaJeztah

Description

PR #49773 improved this error, adding the list of endpoints still connected to the network, however it didn't account for endpoints without a name, which could cause the error to include an empty list of names;

error while removing network: network XXX_storage has active endpoints (, , )

Reproduce

No consistent reproducer.

Expected behavior

The list of endpoints to

  • not include empty values (could be either "id" or "name")
  • not include duplicate values (i.e., we should account for "name" and "id" being for the same endpoint?)

docker version

Client: Docker Engine - Community
 Version:           28.1.1
 API version:       1.49
 Go version:        go1.23.8
 Git commit:        4eba377
 Built:             Fri Apr 18 09:52:57 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.1.1
  API version:      1.49 (minimum version 1.24)
  Go version:       go1.23.8
  Git commit:       01f442b
  Built:            Fri Apr 18 09:52:57 2025
  OS/Arch:          linux/amd64
  Experimental:     false

docker info

not relevant for this

Additional Info

No response

Metadata

Metadata

Assignees

Labels

area/networkingNetworkingkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.

Type

No type
No fields configured for issues without a type.

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions