kubernetes/kops · error
found multiple routers with name: %s
Error message
found multiple routers with name: %s
What it means
Router.Find discovers the existing Neutron router by name and, like the other Openstack Find methods, requires exactly one match. When the routers list returns more than one router with the task's name, it returns this error rather than picking one arbitrarily.
Source
Thrown at upup/pkg/fi/cloudup/openstacktasks/router.go:69
find.ID = actual.ID
}
return actual, nil
}
func (n *Router) Find(context *fi.CloudupContext) (*Router, error) {
cloud := context.T.Cloud.(openstack.OpenstackCloud)
opt := routers.ListOpts{
Name: fi.ValueOf(n.Name),
ID: fi.ValueOf(n.ID),
}
rs, err := cloud.ListRouters(opt)
if err != nil {
return nil, err
}
if rs == nil {
return nil, nil
} else if len(rs) != 1 {
return nil, fmt.Errorf("found multiple routers with name: %s", fi.ValueOf(n.Name))
}
return NewRouterTaskFromCloud(cloud, n.Lifecycle, &rs[0], n)
}
func (c *Router) Run(context *fi.CloudupContext) error {
return fi.CloudupDefaultDeltaRunMethod(c, context)
}
func (_ *Router) CheckChanges(a, e, changes *Router) error {
if a == nil {
if e.Name == nil {
return fi.RequiredField("Name")
}
} else {
if changes.Name != nil {
return fi.CannotChangeField("Name")
}
if changes.AvailabilityZoneHints != nil {View on GitHub (pinned to 4c8573c808)
Solutions
- Run `openstack router list --name <name>` to find duplicates
- Delete or rename the stale duplicate router
- Re-run kops once exactly one router with that name remains
- Scope clusters to separate Openstack projects to avoid name collisions
Example fix
null
Defensive patterns
Strategy: validation
Validate before calling
routers, err := cloud.ListRouters(routers.ListOpts{Name: routerName})
if err != nil { return err }
if len(routers) > 1 {
return fmt.Errorf("found multiple routers with name: %s — remove duplicates", routerName)
} Try / catch
if err := task.Find(cloud); err != nil {
if strings.Contains(err.Error(), "found multiple routers") {
// remediate: `openstack router list --name <n>`, delete stale duplicate, retry
}
} Prevention
- Clean up routers from aborted runs before re-applying
- Don't create routers manually with kops-managed names
- Isolate clusters in separate Openstack projects
When it happens
Trigger: len(rs) != 1 in the routers list filtered by the Router task name during reconciliation — i.e. two or more Neutron routers share the name in the project.
Common situations: Duplicate router left over from an earlier failed kops run; a manually created router with a colliding name; routers from a previous cluster reuse in the same project.
Related errors
- Error creating router. Could not list external networks for
- Failed to find floatingip subnet: %v
- Error creating router: %v
- error describing Network: %v
- network %q not found
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/1335d20274071c8b.
Report an issue: GitHub.