{"record":{"id":"bbb27a3f34b98943","repo":"kubernetes/kops","slug":"failed-to-create-member-v","errorCode":null,"errorMessage":"Failed to create member: %v","messagePattern":"Failed to create member: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/poolassociation.go","lineNumber":185,"sourceCode":"\t\tfor _, server := range serverList {\n\t\t\tval, ok := server.Metadata[\"k8s\"]\n\t\t\tif !ok || val != fi.ValueOf(e.ClusterName) {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tmemberAddress, err := GetServerFixedIP(t.Cloud.ComputeClient(), &server, fi.ValueOf(e.InterfaceName))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tmember, err := t.Cloud.AssociateToPool(&server, fi.ValueOf(e.Pool.ID), v2pools.CreateMemberOpts{\n\t\t\t\tName:         fi.ValueOf(e.Name),\n\t\t\t\tProtocolPort: fi.ValueOf(e.ProtocolPort),\n\t\t\t\tSubnetID:     fi.ValueOf(e.Pool.Loadbalancer.VipSubnet),\n\t\t\t\tAddress:      memberAddress,\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"Failed to create member: %v\", err)\n\t\t\t}\n\t\t\te.ID = new(member.ID)\n\t\t}\n\t} else {\n\t\t_, err := t.Cloud.UpdateMemberInPool(fi.ValueOf(a.Pool.ID), fi.ValueOf(a.ID), v2pools.UpdateMemberOpts{\n\t\t\tWeight: e.Weight,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Failed to update member: %v\", err)\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":167,"sourceCodeEnd":199,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/poolassociation.go#L167-L199","documentation":"RenderOpenstack associates each matching server to the Octavia pool via Cloud.AssociateToPool with CreateMemberOpts (name, protocol port, VIP subnet, fixed-IP address). If Octavia rejects the member-creation call, kOps wraps the error with this message and the pool member is not created.","triggerScenarios":"t.Cloud.AssociateToPool(&server, poolID, CreateMemberOpts{...}) errors: subnet mismatch (member address not in VipSubnet), invalid ProtocolPort (out of range/duplicate), pool's loadbalancer not in ACTIVE state, 409 conflict, or quota/permission failure on Octavia.","commonSituations":"VipSubnet differs from the subnet the server's fixed IP lives on (most common); loadbalancer stuck in PENDING_* state from a previous failed operation; protocol port already used by another member; Octavia quota exceeded.","solutions":["Check the wrapped Octavia error: 400/409 usually means subnet or port conflict","Verify Pool.Loadbalancer.VipSubnet is the subnet containing the server's fixed IP","Ensure the loadbalancer is in ACTIVE state (`openstack loadbalancer status show <lb>`); fix pending states first","Confirm ProtocolPort is valid and not already assigned to another pool member","Check Octavia quota and the kops credentials' member-management permissions"],"exampleFix":"// before\nSubnetID: fi.ValueOf(e.Pool.Loadbalancer.VipSubnet) // VIP subnet != node subnet\n// after: use the subnet of the resolved memberAddress so Octavia accepts the member","handlingStrategy":"validation","validationCode":"// ensure member address subnet matches the VIP subnet before associating\nif subnetOf(memberAddress) != fi.ValueOf(e.Pool.Loadbalancer.VipSubnet) {\n\treturn fmt.Errorf(\"member address %s not in VIP subnet %s\", memberAddress, vipSubnet)\n}\n// and ensure LB is ACTIVE\nstatus, _ := exec.Command(\"openstack\", \"loadbalancer\", \"status\", \"show\", lbID).Output()\nif !bytes.Contains(status, []byte(\"ACTIVE\")) { return fmt.Errorf(\"LB not ACTIVE\") }","typeGuard":"func memberOptsValid(opts v2pools.CreateMemberOpts) bool {\n\treturn opts.Address != \"\" && opts.SubnetID != \"\" &&\n\t\t*opts.ProtocolPort > 0 && *opts.ProtocolPort <= 65535\n}","tryCatchPattern":"member, err := t.Cloud.AssociateToPool(&server, poolID, opts)\nif err != nil {\n\tvar gerr gophercloud.ErrUnexpectedResponseCode\n\tif errors.As(err, &gerr) && gerr.Actual == 409 {\n\t\t// LB pending or duplicate member: reconcile LB state then retry\n\t}\n\treturn fmt.Errorf(\"Failed to create member: %v\", err)\n}","preventionTips":["Keep node instances on the same subnet as the loadbalancer VIP subnet","Ensure the loadbalancer is ACTIVE before associating members","Avoid reusing protocol ports across members on the same pool"],"tags":["openstack","octavia","loadbalancer","pool-member"],"backgroundTag":"octavia-member-creation-failed","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"}