{"record":{"id":"0eeb5645637b44a8","repo":"kubernetes/kops","slug":"etcdclusters-d-did-not-specify-a-name","errorCode":null,"errorMessage":"EtcdClusters #%d did not specify a Name","messagePattern":"EtcdClusters #(.+?) did not specify a Name","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/populate_cluster_spec.go","lineNumber":122,"sourceCode":"\t}\n\n\t// TODO: Move to validate?\n\t// Check that instance groups are defined in valid zones\n\t{\n\t\t// TODO: Check that instance groups referenced here exist\n\t\t//clusterSubnets := make(map[string]*kopsapi.ClusterSubnetSpec)\n\t\t//for _, subnet := range cluster.Spec.Subnets {\n\t\t//\tif clusterSubnets[subnet.Name] != nil {\n\t\t//\t\treturn fmt.Errorf(\"Subnets contained a duplicate value: %v\", subnet.Name)\n\t\t//\t}\n\t\t//\tclusterSubnets[subnet.Name] = subnet\n\t\t//}\n\n\t\t// Check etcd configuration\n\t\t{\n\t\t\tfor i, etcd := range cluster.Spec.EtcdClusters {\n\t\t\t\tif etcd.Name == \"\" {\n\t\t\t\t\treturn fmt.Errorf(\"EtcdClusters #%d did not specify a Name\", i)\n\t\t\t\t}\n\n\t\t\t\tfor i, m := range etcd.Members {\n\t\t\t\t\tif m.Name == \"\" {\n\t\t\t\t\t\treturn fmt.Errorf(\"EtcdMember #%d of etcd-cluster %s did not specify a Name\", i, etcd.Name)\n\t\t\t\t\t}\n\n\t\t\t\t\tif fi.ValueOf(m.InstanceGroup) == \"\" {\n\t\t\t\t\t\treturn fmt.Errorf(\"EtcdMember %s:%s did not specify a InstanceGroup\", etcd.Name, m.Name)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tetcdInstanceGroups := make(map[string]kopsapi.EtcdMemberSpec)\n\t\t\t\tetcdNames := make(map[string]kopsapi.EtcdMemberSpec)\n\n\t\t\t\tfor _, m := range etcd.Members {\n\t\t\t\t\tif _, ok := etcdNames[m.Name]; ok {\n\t\t\t\t\t\treturn fmt.Errorf(\"EtcdMembers found with same name %q in etcd-cluster %q\", m.Name, etcd.Name)","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/populate_cluster_spec.go#L104-L140","documentation":"While populating the cluster spec, an entry in spec.etcdClusters has an empty name. Each etcd cluster must be named (e.g. 'main', 'events') so kops can associate members and generate correct configuration; the check fires during spec completion before validation.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/populate_cluster_spec.go:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set a name on every entry in the cluster's etcdClusters list","Use the conventional names 'main' and 'events' for standard clusters"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}