{"record":{"id":"e55e0430bacb1cfb","repo":"kubernetes/kops","slug":"failed-to-create-pool-association-v","errorCode":null,"errorMessage":"failed to create pool association: %v","messagePattern":"failed to create pool association: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/loadbalancer.go","lineNumber":415,"sourceCode":"\treturn association, nil\n}\n\nfunc (c *openstackCloud) AssociateToPool(server *servers.Server, poolID string, opts v2pools.CreateMemberOpts) (association *v2pools.Member, err error) {\n\treturn associateToPool(c, server, poolID, opts)\n}\n\nfunc associateToPool(c OpenstackCloud, server *servers.Server, poolID string, opts v2pools.CreateMemberOpts) (association *v2pools.Member, err error) {\n\tif c.LoadBalancerClient() == nil {\n\t\treturn nil, fmt.Errorf(\"loadbalancer support not available in this deployment\")\n\t}\n\n\tdone, err := vfs.RetryWithBackoff(writeBackoff, func() (bool, error) {\n\t\tassociation, err = v2pools.GetMember(context.TODO(), c.LoadBalancerClient(), poolID, server.ID).Extract()\n\t\tif err != nil || association == nil {\n\t\t\t// Pool association does not exist.  Create it\n\t\t\tassociation, err = v2pools.CreateMember(context.TODO(), c.LoadBalancerClient(), poolID, opts).Extract()\n\t\t\tif err != nil {\n\t\t\t\treturn false, fmt.Errorf(\"failed to create pool association: %v\", err)\n\t\t\t}\n\t\t\treturn true, nil\n\t\t}\n\t\t// NOOP\n\t\treturn true, nil\n\t})\n\tif !done {\n\t\tif err == nil {\n\t\t\terr = wait.ErrWaitTimeout\n\t\t}\n\t\treturn association, err\n\t}\n\treturn association, nil\n}\n\nfunc (c *openstackCloud) CreatePool(opts v2pools.CreateOpts) (pool *v2pools.Pool, err error) {\n\treturn createPool(c, opts)\n}","sourceCodeStart":397,"sourceCodeEnd":433,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/loadbalancer.go#L397-L433","documentation":"Wrapped failure from v2pools.CreateMember in associateToPool's writeBackoff loop. Association lookup succeeded (member absent), but creating the new pool member failed at the Octavia API; the underlying gophercloud error is embedded via %v.","triggerScenarios":"CreateMember rejected due to invalid CreateMemberOpts (bad subnet_id, address not on the member subnet), quota exceeded for members, 409 immutable pool state across all retries, or 404 pool no longer exists.","commonSituations":"Node IP not in the subnet configured for the pool; subnet-id missing or wrong in the cluster LB config; Octavia quotas hit in shared projects; pool deleted concurrently by a cluster teardown.","solutions":["Read the wrapped %v error: 404/409 indicate the pool is gone or immutable — verify pool existence and wait for PENDING states to clear.","Validate CreateMemberOpts: address must belong to the pool's subnet-id configured in the kOps cluster spec.","Check Octavia member quotas (`openstack quota show`) and raise if exceeded.","Verify keystone permissions to create members in the target project."],"exampleFix":"// before\nopts := v2pools.CreateMemberOpts{Address: nodeIP, ProtocolPort: 443} // missing SubnetID\n// after\nopts := v2pools.CreateMemberOpts{Address: nodeIP, ProtocolPort: 443, SubnetID: poolSubnetID}","handlingStrategy":"try-catch","validationCode":"member, _ := cloud.GetPoolMember(poolID, server.ID)\nif member == nil && (opts.SubnetID == \"\" || opts.Address == \"\") {\n\treturn fmt.Errorf(\"invalid CreateMemberOpts: address and subnet-id required\")\n}","typeGuard":null,"tryCatchPattern":"assoc, err := cloud.AssociateToPool(server, poolID, opts)\nif err != nil {\n\tif strings.Contains(err.Error(), \"failed to create pool association\") {\n\t\tif strings.Contains(err.Error(), \"409\") {\n\t\t\treturn retryLater(err) // pool immutable\n\t\t}\n\t\tif strings.Contains(err.Error(), \"404\") {\n\t\t\treturn ErrPoolGone\n\t\t}\n\t}\n\treturn err\n}","preventionTips":["Ensure node IPs are within the subnet configured for the pool (subnet-id in cluster spec).","Monitor Octavia member quotas in shared projects.","Verify pool existence before attempting association."],"tags":["openstack","octavia","create-member","pool-association"],"backgroundTag":"octavia-member-create-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}