{"record":{"id":"500f3f0293bd2b14","repo":"kubernetes/kops","slug":"invalid-etcdclusterspec-member-not-found-in-all-n","errorCode":null,"errorMessage":"invalid EtcdClusterSpec (member not found in all nodes): %q","messagePattern":"invalid EtcdClusterSpec \\(member not found in all nodes\\): %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/etcd/cluster_spec.go","lineNumber":59,"sourceCode":"func ParseEtcdClusterSpec(clusterKey, v string) (*EtcdClusterSpec, error) {\n\tv = strings.TrimSpace(v)\n\n\ttokens := strings.Split(v, \"/\")\n\tif len(tokens) != 2 {\n\t\treturn nil, fmt.Errorf(\"invalid EtcdClusterSpec (expected two tokens): %q\", v)\n\t}\n\n\tnodeName := tokens[0]\n\tnodeNames := strings.Split(tokens[1], \",\")\n\n\tfound := false\n\tfor _, s := range nodeNames {\n\t\tif s == nodeName {\n\t\t\tfound = true\n\t\t}\n\t}\n\tif !found {\n\t\treturn nil, fmt.Errorf(\"invalid EtcdClusterSpec (member not found in all nodes): %q\", v)\n\t}\n\n\tc := &EtcdClusterSpec{\n\t\tClusterKey: clusterKey,\n\t\tNodeName:   nodeName,\n\t\tNodeNames:  nodeNames,\n\t}\n\treturn c, nil\n}\n","sourceCodeStart":41,"sourceCodeEnd":69,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/etcd/cluster_spec.go#L41-L69","documentation":"ParseEtcdClusterSpec throws this error when the member name before the '/' (myname) is not present in the comma-separated list of all node names after the '/'. The spec's structure parsed fine, but it is internally inconsistent: the node claims membership in an etcd cluster that does not list it. This guards against stale or partially updated volume tags.","triggerScenarios":"findEtcdStatus passes a tag like \"nodeX/node1,node2,node3\" where nodeX does not appear among node1,node2,node3. Typically the volume was detached and reattached to a different instance, the tag was edited changing only one half, or the etcd cluster membership changed (member replaced/removed) without updating this volume's tag.","commonSituations":"After an etcd member replacement or cluster resize where the old volume retains its old tag; disk/instance reuse across clusters with mismatched names; case-sensitivity or typo differences between myname and the allnames list (e.g. \"Node1\" vs \"node1\"); manually copying tags between volumes.","solutions":["Compare the quoted value in the error: the name before '/' must exactly (case-sensitively) match one of the comma-separated entries after '/'. Fix the volume tag accordingly.","If the volume belongs to a replaced/removed etcd member, remove or re-tag the stale volume rather than reusing it in the current cluster.","Re-run the etcd member replacement flow (`kops replace` / rolling-update) so kops rewrites the tags consistently.","Check for typos or case mismatches in node names between the instance name and the etcd cluster member list."],"exampleFix":"// before: myname not present in allnames\nv := \"nodeX/node1,node2,node3\"\n// after: myname is a member of the allnames list\nv := \"node1/node1,node2,node3\"","handlingStrategy":"validation","validationCode":"// validate internal consistency before parsing\nfunc validEtcdClusterSpecMembership(v string) bool {\n    v = strings.TrimSpace(v)\n    parts := strings.Split(v, \"/\")\n    if len(parts) != 2 {\n        return false\n    }\n    for _, n := range strings.Split(parts[1], \",\") {\n        if n == parts[0] {\n            return true\n        }\n    }\n    return false\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After replacing or removing an etcd member, re-run the kops replacement flow so tags stay consistent.","Never manually copy etcd volume tags between instances.","Match node names exactly (case-sensitive) between instance names and cluster member lists.","Discard stale volumes from decommissioned etcd members instead of reattaching them."],"tags":["etcd","parsing","kops","config"],"backgroundTag":"etcd-member-mismatch","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"}