kubernetes/kops · error
Multiple listeners found with name %s
Error message
Multiple listeners found with name %s
What it means
kOps assumes listener names are unique within the OpenStack project. When ListListeners filtered by the task's name returns more than one listener, kOps refuses to proceed because it cannot decide which listener corresponds to the cluster resource.
Source
Thrown at upup/pkg/fi/cloudup/openstacktasks/lblistener.go:119
func (s *LBListener) Find(context *fi.CloudupContext) (*LBListener, error) {
if s.Name == nil {
return nil, nil
}
cloud := context.T.Cloud.(openstack.OpenstackCloud)
listenerList, err := cloud.ListListeners(listeners.ListOpts{
ID: fi.ValueOf(s.ID),
Name: fi.ValueOf(s.Name),
})
if err != nil {
return nil, fmt.Errorf("Failed to list loadbalancer listeners for name %s: %v", fi.ValueOf(s.Name), err)
}
if len(listenerList) == 0 {
return nil, nil
}
if len(listenerList) > 1 {
return nil, fmt.Errorf("Multiple listeners found with name %s", fi.ValueOf(s.Name))
}
return NewLBListenerTaskFromCloud(cloud, s.Lifecycle, &listenerList[0], s)
}
func (s *LBListener) Run(context *fi.CloudupContext) error {
return fi.CloudupDefaultDeltaRunMethod(s, context)
}
func (_ *LBListener) CheckChanges(a, e, changes *LBListener) error {
if a == nil {
if e.Name == nil {
return fi.RequiredField("Name")
}
} else {
if changes.ID != nil {
return fi.CannotChangeField("ID")
}View on GitHub (pinned to 4c8573c808)
Solutions
- List and inspect duplicates: `openstack loadbalancer listener list | grep <name>`
- Delete the stale/duplicate listener(s) (`openstack loadbalancer listener delete <id>`) keeping the one matching the cluster spec
- Give listeners globally unique names per project in the cluster config to avoid collisions
Example fix
// before: duplicate listeners with the same name openstack loadbalancer listener list # shows two entries named 'api' // after: remove the stale one openstack loadbalancer listener delete <stale-id> kops update cluster --name mycluster
Defensive patterns
Strategy: validation
Validate before calling
// Ensure listener names are unique in the project before updating
dups=$(openstack loadbalancer listener list -f value -c Name | sort | uniq -d)
[ -z "$dups" ] || { echo "duplicate listener names: $dups"; exit 1; } Prevention
- Enforce unique listener names per project in automation (Terraform/Heat) that shares the tenant
- After a failed cluster update, check for and remove partial/duplicate listeners before re-running
- Never create listeners manually with names used by the kops cluster spec
When it happens
Trigger: Find with s.Name set where the Octavia list query (ID/Name filter) matches ≥2 listeners — duplicate listeners sharing the cluster-configured name exist in the same tenant.
Common situations: A previous failed `kops update cluster` left a partially created duplicate; someone manually created another listener with the same name on the same LB or a different LB; clusters reusing a name across LBs in one project.
Related errors
- error deleting listener: %v
- failed to build load balancer client: %w
- cluster configured to use octavia, but router was not config
- error building lb client: %w
- loadbalancer API versions not found
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/92dff67bab0dc0ed.
Report an issue: GitHub.