kubernetes/kops · error
found multiple networks with name: %s
Error message
found multiple networks with name: %s
What it means
Network.Find lists Neutron networks by Name/ID and requires exactly one match; when ListNetworks returns more than one network it returns this error rather than picking arbitrarily. It prevents kOps from reconciling the wrong network for the cluster.
Source
Thrown at upup/pkg/fi/cloudup/openstacktasks/network.go:76
func (n *Network) Find(context *fi.CloudupContext) (*Network, error) {
if n.Name == nil && n.ID == nil {
return nil, nil
}
cloud := context.T.Cloud.(openstack.OpenstackCloud)
opt := networks.ListOpts{
ID: fi.ValueOf(n.ID),
Name: fi.ValueOf(n.Name),
}
ns, err := cloud.ListNetworks(opt)
if err != nil {
return nil, err
}
if ns == nil {
return nil, nil
} else if len(ns) != 1 {
return nil, fmt.Errorf("found multiple networks with name: %s", fi.ValueOf(n.Name))
}
v := ns[0]
actual, err := NewNetworkTaskFromCloud(cloud, n.Lifecycle, &v, n.Tag)
if err != nil {
return nil, fmt.Errorf("Failed to create new Network object: %v", err)
}
n.ID = actual.ID
return actual, nil
}
func (c *Network) Run(context *fi.CloudupContext) error {
return fi.CloudupDefaultDeltaRunMethod(c, context)
}
func (_ *Network) CheckChanges(a, e, changes *Network) error {
if a == nil {
if e.Name == nil {
return fi.RequiredField("Name")View on GitHub (pinned to 4c8573c808)
Solutions
- List matches: openstack network list --name <name>, and delete the stale/duplicate network if it is not in use.
- Pin the network ID in the cluster spec (or kops state) so Find filters by unique ID instead of name.
- Rename the non-managed network so names are unique within the project.
- If the duplicates belong to another project, fix credentials/scoping so listing only sees the intended tenant's networks.
Example fix
// before: spec resolves network by name only network: mycluster.k8s.local # matches 2 networks // after: delete the orphan $ openstack network delete <stale-network-id> $ kops update cluster --name mycluster --yes
Defensive patterns
Strategy: validation
Validate before calling
nets := neutronNetworkList(name)
if len(nets) > 1 {
return fmt.Errorf("%d networks named %q exist (%v); resolve duplicates or specify network ID", len(nets), name, netIDs(nets))
} Try / catch
if err := kopsUpdate(); err != nil {
if strings.Contains(err.Error(), "found multiple networks with name") {
return resolveDuplicateNetworks() // delete orphan or pin ID in spec, then retry
}
return err
} Prevention
- Use unique network names per project, or pass the network ID in the cluster spec.
- Remove leftover networks after aborted cluster deletions.
- Scope credentials to a single tenant so listing only sees intended networks.
When it happens
Trigger: Find is called with only the network name set (n.ID nil) and the project contains two or more networks with that name — e.g. networks in different regions sharing a name, or duplicates created across tenants the token can see.
Common situations: Reusing a cluster/network name after incomplete teardown; operator manually created a second network with the same name; per-AZ duplicated networks from other tooling; searching without tenant scoping.
Related errors
- error describing Network: %v
- network %q not found
- error retrieving network with id %s: %v
- error listing networks: %v
- error extracting networks from pages: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/3f00496317048ad3.
Report an issue: GitHub.