{"record":{"id":"8ef3bc956dea18ea","repo":"kubernetes/kops","slug":"could-not-find-ip-for-server-s","errorCode":null,"errorMessage":"could not find IP for server %s","messagePattern":"could not find IP for server (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/cloud.go","lineNumber":516,"sourceCode":"\nfunc (s *scwCloudImplementation) GetServerIP(serverID string, zone scw.Zone) (string, error) {\n\tregion, err := zone.Region()\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"converting zone %s to region: %w\", zone, err)\n\t}\n\n\tips, err := s.ipamAPI.ListIPs(&ipam.ListIPsRequest{\n\t\tRegion:     region,\n\t\tIsIPv6:     new(false),\n\t\tResourceID: &serverID,\n\t\tZonal:      new(zone.String()),\n\t}, scw.WithAllPages())\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"listing IPs for server %s: %w\", serverID, err)\n\t}\n\n\tif len(ips.IPs) < 1 {\n\t\treturn \"\", fmt.Errorf(\"could not find IP for server %s\", serverID)\n\t}\n\tif len(ips.IPs) > 1 {\n\t\tklog.V(10).Infof(\"Found more than 1 IP for server %s, using %s\", serverID, ips.IPs[0].Address.IP.String())\n\t}\n\n\treturn ips.IPs[0].Address.IP.String(), nil\n}\n\nfunc (s *scwCloudImplementation) DeleteDNSRecord(record *domain.Record, clusterName string) error {\n\tdomainName := strings.SplitN(clusterName, \".\", 2)[1]\n\trecordDeleteRequest := &domain.UpdateDNSZoneRecordsRequest{\n\t\tDNSZone: domainName,\n\t\tChanges: []*domain.RecordChange{\n\t\t\t{\n\t\t\t\tDelete: &domain.RecordChangeDelete{\n\t\t\t\t\tID: scw.StringPtr(record.ID),\n\t\t\t\t},\n\t\t\t},","sourceCodeStart":498,"sourceCodeEnd":534,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/cloud.go#L498-L534","documentation":"Sentinel error returned by GetServerIP when the IPAM ListIPs call succeeds but returns zero IPs for the server. Unlike the wrap errors, this is a domain condition: Scaleway knows the server but has no IP registered for it in IPAM. It means the instance cannot be resolved to an address for deregistration or cloud-group membership.","triggerScenarios":"Server has no private IP registered in IPAM (server still booting, just created, or terminated); querying a zone where the server has no IP; IsIPv6=false filter excludes servers with only IPv6.","commonSituations":"DeregisterInstance racing instance termination; newly-joined instance not yet assigned an IP; IPv6-only configuration; server ID from a different project/zone than queried.","solutions":["Verify the server is running and has an IP in the Scaleway console or via `scw instance server get <id>`.","Retry shortly after instance creation — IPs can lag server availability.","Check whether the cluster is IPv6-only; if so the IsIPv6=false filter must be relaxed.","Confirm serverID and zone belong to the same project as the credentials.","If deregistering a just-deleted server, treat this as benign and skip."],"exampleFix":"// before\nip, err := cloud.GetServerIP(serverID, zone)\nif err != nil {\n  return fmt.Errorf(\"deregistering instance: %w\", err)\n}\n// after\nip, err := cloud.GetServerIP(serverID, zone)\nif err != nil {\n  if strings.Contains(err.Error(), \"could not find IP for server\") {\n    klog.V(4).Infof(\"server %s has no IP (likely already deleted), skipping\", serverID)\n    return nil\n  }\n  return fmt.Errorf(\"deregistering instance: %w\", err)\n}","handlingStrategy":"fallback","validationCode":"// check server state before resolving IP\nsrv, err := instance.NewAPI(client).GetServer(&instance.GetServerRequest{ServerID: serverID, Zone: zone})\nif err != nil || srv.Server.State != instance.ServerStateRunning {\n  // skip IP resolution; server missing or not ready\n}","typeGuard":null,"tryCatchPattern":"ip, err := cloud.GetServerIP(serverID, zone)\nif err != nil && strings.Contains(err.Error(), \"could not find IP for server\") {\n  // treat as already-deleted / not-ready and skip or retry later\n}","preventionTips":["Add a short delay or state check between instance creation and IP resolution.","Handle deregistration of terminated instances as a no-op.","Avoid IPv6-only nodes unless the IP resolution path is updated (IsIPv6 filter)."],"tags":["scaleway","ipam","instance","not-found"],"backgroundTag":"ip-address-not-found","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"}