kubernetes/kops · error
found multiple Akamai (Linode) VPC Subnets named %q
Error message
found multiple Akamai (Linode) VPC Subnets named %q
What it means
Find() matches subnets within the VPC by label. Linode apparently allows duplicate labels within a VPC, so if two subnets share the requested label the match is ambiguous and Find() refuses to choose.
Source
Thrown at upup/pkg/fi/cloudup/linodetasks/subnet.go:79
return nil, fi.NewTryAgainLaterError("waiting for VPC ID")
}
return nil, fmt.Errorf("Subnet.VPC.ID is required")
}
subnets, err := cloud.Client().ListVPCSubnets(c.Context(), fi.ValueOf(v.VPC.ID), nil)
if err != nil {
return nil, fmt.Errorf("error listing Akamai (Linode) VPC Subnets: %w", err)
}
var foundByName *linodego.VPCSubnet
var foundByIPv4 *linodego.VPCSubnet
name := fi.ValueOf(v.Name)
ipv4 := fi.ValueOf(v.IPv4)
for i := range subnets {
candidate := &subnets[i]
if candidate.Label == name {
if foundByName != nil {
return nil, fmt.Errorf("found multiple Akamai (Linode) VPC Subnets named %q", name)
}
foundByName = candidate
}
if ipv4 != "" && candidate.IPv4 == ipv4 {
if foundByIPv4 == nil {
foundByIPv4 = candidate
}
}
}
found := foundByName
if found == nil {
found = foundByIPv4
if found == nil {
return nil, nil
}
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Rename or delete duplicate subnets in the Linode Cloud Manager / linode-cli so only one has that label
- Use unique subnet names per cluster even when sharing a VPC
- Match by IPv4 instead by setting the subnet's IPv4 in the spec (Find also matches by ipv4)
- Delete leftover subnets from aborted cluster creates
Example fix
// before: two subnets labeled 'subnet-1' in one VPC // after // linode-cli vpcs-subnets list <vpc-id> // linode-cli vpcs-subnets delete <vpc-id> <duplicate-subnet-id>
Defensive patterns
Strategy: validation
Validate before calling
subs, _ := client.ListVPCSubnets(ctx, vpcID, nil)
n := 0
for _, s := range subs {
if s.Label == name { n++ }
}
if n > 1 { return fmt.Errorf("%d duplicate subnet labels for %q in VPC %d", n, name, vpcID) } Type guard
func uniqueSubnet(subs []linodego.VPCSubnet, name string) *linodego.VPCSubnet {
var m *linodego.VPCSubnet
for i := range subs {
if subs[i].Label != name { continue }
if m != nil { return nil }
m = &subs[i]
}
return m
} Prevention
- Use globally unique subnet names per VPC/cluster
- Delete leftovers from aborted creates
- Prefer matching by IPv4 when labels may collide
When it happens
Trigger: Two or more subnets in the same VPC have candidate.Label equal to the requested subnet name when Find() scans ListVPCSubnets results.
Common situations: Subnets created manually or by a previous aborted run with the same label, or operators reusing names across clusters sharing one VPC.
Related errors
- error listing Akamai (Linode) VPC subnets for VPC %s(%d): %w
- error deleting Akamai (Linode) subnet %s(%s): %w
- Subnet.VPC is required
- Subnet.VPC.ID is required
- error listing Akamai (Linode) VPC Subnets: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/35aa67fc3d473dd9.
Report an issue: GitHub.