{"record":{"id":"5b57ce8cc1948233","repo":"kubernetes/kops","slug":"failed-to-get-server-s-w","errorCode":null,"errorMessage":"failed to get server %s: %w","messagePattern":"failed to get server (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodeidentity/scaleway/identify.go","lineNumber":150,"sourceCode":"// stringKeyFunc is a string as cache key function\nfunc stringKeyFunc(obj interface{}) (string, error) {\n\tkey := obj.(*nodeidentity.Info).InstanceID\n\treturn key, nil\n}\n\n// getServer queries Scaleway for the server with the specified ID, returning an error if not found\nfunc (i *nodeIdentifier) getServer(ctx context.Context, id string) (*instance.Server, error) {\n\tapi := instance.NewAPI(i.client)\n\tuuid := strings.Split(id, \"/\")\n\tif len(uuid) != 3 {\n\t\treturn nil, fmt.Errorf(\"unexpected format for server id %s\", id)\n\t}\n\tserver, err := api.GetServer(&instance.GetServerRequest{\n\t\tServerID: uuid[2],\n\t\tZone:     scw.Zone(uuid[1]),\n\t}, scw.WithContext(ctx))\n\tif err != nil || server == nil {\n\t\treturn nil, fmt.Errorf(\"failed to get server %s: %w\", id, err)\n\t}\n\n\treturn server.Server, nil\n}\n","sourceCodeStart":132,"sourceCodeEnd":155,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodeidentity/scaleway/identify.go#L132-L155","documentation":"After parsing the id, getServer calls the Scaleway instance API GetServer. If the API call errors or returns nil server, the error is wrapped as 'failed to get server <id>'. This indicates the server could not be retrieved from the Scaleway API.","triggerScenarios":"Scaleway API returns an error (invalid credentials, wrong zone, server not found/deleted, rate limiting, network failure) or GetServer returns a nil server for the given ServerID/Zone.","commonSituations":"Server terminated between event and lookup; wrong zone segment in the provider id; expired/missing Scaleway credentials (access key/secret key); Scaleway API outage or throttling.","solutions":["Inspect the wrapped cause (%w) for the underlying Scaleway API error and fix per its message","Verify Scaleway credentials (access key, secret key, organization/project) in the environment/config","Confirm the zone and server UUID in the provider id are correct and the server still exists","Retry after checking Scaleway status page if it's a transient API/network failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"server, err := getServer(ctx, id)\nif err != nil {\n    var apiErr *scw.Error\n    if errors.As(err, &apiErr) && apiErr.StatusCode == http.StatusNotFound {\n        // server deleted; stop retrying\n        return ErrServerGone\n    }\n    // transient: credentials, network, throttling\n    return fmt.Errorf(\"retrying server lookup: %w\", err)\n}","preventionTips":["Verify Scaleway credentials (SCW_ACCESS_KEY/SCW_SECRET_KEY) before cluster operations","Handle scw.Error status codes distinctly (404 vs 429 vs 5xx)","Add retries with backoff for transient API failures","Confirm server existence before scheduled node identification"],"tags":["scaleway","api","server-lookup"],"backgroundTag":"cloud-api-lookup-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}