{"record":{"id":"c3deb24a3fdb4c66","repo":"kubernetes/kops","slug":"loadbalancers-list-returned-error-v-c3deb2","errorCode":null,"errorMessage":"LoadBalancers.List returned error: %v","messagePattern":"LoadBalancers\\.List returned error: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/dotasks/loadbalancer.go","lineNumber":160,"sourceCode":"\t\t\tTargetPort:     wellknownports.KopsControllerPort,\n\t\t\tTlsPassthrough: true,\n\t\t},\n\t}\n\n\tHealthCheck := &godo.HealthCheck{\n\t\tProtocol:               \"tcp\",\n\t\tPort:                   443,\n\t\tPath:                   \"\",\n\t\tCheckIntervalSeconds:   60,\n\t\tResponseTimeoutSeconds: 5,\n\t\tUnhealthyThreshold:     3,\n\t\tHealthyThreshold:       5,\n\t}\n\n\t// check if load balancer exist.\n\tloadBalancers, err := t.Cloud.GetAllLoadBalancers()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"LoadBalancers.List returned error: %v\", err)\n\t}\n\n\tfor _, loadbalancer := range loadBalancers {\n\t\tklog.V(10).Infof(\"load balancer retrieved=%s, e.Name=%s\", loadbalancer.Name, fi.ValueOf(e.Name))\n\t\tif strings.Contains(loadbalancer.Name, fi.ValueOf(e.Name)) {\n\t\t\t// load balancer already exists.\n\t\t\te.ID = new(loadbalancer.ID)\n\t\t\te.IPAddress = new(loadbalancer.IP) // This will be empty on create, but will be filled later on FindAddresses invokation.\n\t\t\treturn nil\n\t\t}\n\t}\n\n\t// associate vpcuuid to the loadbalancer if set\n\tvpcUUID := \"\"\n\tif fi.ValueOf(e.NetworkCIDR) != \"\" {\n\t\tvpcUUID, err = t.Cloud.GetVPCUUID(fi.ValueOf(e.NetworkCIDR), fi.ValueOf(e.VPCName))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error fetching vpcUUID from network cidr=%s\", fi.ValueOf(e.NetworkCIDR))","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/dotasks/loadbalancer.go#L142-L178","documentation":"Wraps GetAllLoadBalancers failure in the DO load-balancer renderer, used to check whether a LB with the expected name already exists before creating one. Fires when the DO list call errors, blocking the create-or-adopt decision.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/dotasks/loadbalancer.go:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the DO API token and connectivity","Inspect the wrapped error for the DO API reason","Retry after transient API failures clear"],"exampleFix":null,"handlingStrategy":"try-catch","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"}