{"record":{"id":"0accdbd5d2f7aabb","repo":"kubernetes/kops","slug":"failed-to-update-pool-membership-v","errorCode":null,"errorMessage":"failed to update pool membership: %v","messagePattern":"failed to update pool membership: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/loadbalancer.go","lineNumber":387,"sourceCode":"\nfunc updateMemberInPool(c OpenstackCloud, poolID string, memberID string, opts v2pools.UpdateMemberOptsBuilder) (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(memberBackoff, func() (bool, error) {\n\t\tassociation, err = v2pools.UpdateMember(context.TODO(), c.LoadBalancerClient(), poolID, memberID, opts).Extract()\n\t\tif err != nil {\n\t\t\t// member not found anymore\n\t\t\tif isNotFound(err) {\n\t\t\t\treturn true, nil\n\t\t\t}\n\t\t\t// pool is currently in immutable state, try to retry\n\t\t\tif gophercloud.ResponseCodeIs(err, http.StatusConflict) {\n\t\t\t\tklog.Infof(\"got error %v retrying...\", http.StatusConflict)\n\t\t\t\treturn false, nil\n\t\t\t}\n\t\t\treturn false, fmt.Errorf(\"failed to update pool membership: %v\", err)\n\t\t}\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) 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 {","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/loadbalancer.go#L369-L405","documentation":"Wrapped failure from v2pools.UpdateMember inside a memberBackoff retry loop in updateMemberInPool. The Octavia API rejected the member update with a status other than the specially-handled 409 Conflict (immutable/PENDING state). The error contains the underlying gophercloud failure.","triggerScenarios":"Calling UpdateMemberInPool while the pool or load balancer is in PENDING_UPDATE/PENDING_CREATE state (API returns 409 repeatedly until timeout), on 404 when the member vanished, or on 4xx/5xx auth/permission errors — any non-conflict failure escapes as this message.","commonSituations":"Rolling node updates racing with Octavia's own reconciles; frequent member churn (autoscaling) keeping the pool constantly in immutable state until retries exhaust; stale member IDs after node replacement.","solutions":["Check the wrapped %v error: 404 means the member is gone — remove it from the desired state rather than retrying.","If timeouts follow repeated 409 (handled earlier in the code), reduce update concurrency or wait for the LB to leave PENDING_UPDATE before re-running.","Verify the credentials can update members (load-balancer_member role) and the pool ID is correct.","Increase memberBackoff duration for large pools where Octavia updates are slow."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"pool, err := cloud.GetPool(poolID)\nif err != nil {\n\treturn fmt.Errorf(\"pool %s not accessible: %w\", poolID, err)\n}\nif pool.ProvisioningStatus != \"ACTIVE\" {\n\treturn fmt.Errorf(\"pool %s is %s; defer member update\", poolID, pool.ProvisioningStatus)\n}","typeGuard":null,"tryCatchPattern":"err := cloud.UpdateMemberInPool(poolID, memberID, opts)\nif err != nil {\n\tif strings.Contains(err.Error(), \"404\") || strings.Contains(err.Error(), \"Not Found\") {\n\t\treturn reconcileMemberRemoved(memberID) // treat as deleted\n\t}\n\tif strings.Contains(err.Error(), \"failed to update pool membership\") {\n\t\treturn retryAfterPendingClears(poolID, opts)\n\t}\n\treturn err\n}","preventionTips":["Check pool.ProvisioningStatus == ACTIVE before updating members.","Throttle member churn (autoscaling) to avoid constant 409 PENDING_UPDATE states.","Handle 404 member-gone as a non-error reconciliation outcome."],"tags":["openstack","octavia","pool-member","conflict","retry"],"backgroundTag":"octavia-pending-update-conflict","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}