{"record":{"id":"9fd0c611aa90317f","repo":"kubernetes/kops","slug":"failed-to-get-server-s-w-9fd0c6","errorCode":null,"errorMessage":"failed to get server %s: %w","messagePattern":"failed to get server (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/verifier.go","lineNumber":98,"sourceCode":"\n\tprofile, err := scalewaymetadata.CreateValidScalewayProfile()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tscwClient, err := scw.NewClient(\n\t\tscw.WithProfile(profile),\n\t\tscw.WithUserAgent(KopsUserAgentPrefix+kopsv.Version),\n\t)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"creating client for Scaleway Verifier: %w\", err)\n\t}\n\n\tserverResponse, err := instance.NewAPI(scwClient).GetServer(&instance.GetServerRequest{\n\t\tServerID: serverID,\n\t\tZone:     zone,\n\t}, scw.WithContext(ctx))\n\tif err != nil || serverResponse == nil || serverResponse.Server == nil {\n\t\treturn nil, fmt.Errorf(\"failed to get server %s: %w\", serverID, err)\n\t}\n\tserver := serverResponse.Server\n\n\tips, err := ipam.NewAPI(scwClient).ListIPs(&ipam.ListIPsRequest{\n\t\tRegion:     region,\n\t\tResourceID: new(server.ID),\n\t\tIsIPv6:     new(false),\n\t\tZonal:      new(zone.String()),\n\t}, scw.WithContext(ctx), scw.WithAllPages())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get IP for server %q: %w\", server.Name, err)\n\t}\n\tif ips.TotalCount == 0 {\n\t\treturn nil, fmt.Errorf(\"no IP found for server %q: %w\", server.Name, err)\n\t}\n\n\taddresses := []string(nil)\n\tchallengeEndPoints := []string(nil)","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/verifier.go#L80-L116","documentation":"VerifyToken calls instance.GetServer with the server ID embedded in the bootstrap token. If the API call errors, or the response contains no Server object, kOps wraps everything in this error and rejects the node bootstrap request.","triggerScenarios":"The instance.GetServer API call fails (network error, 403/404 from Scaleway) or returns a nil Server — e.g. the serverID trimmed from the token does not exist in the zone, or the control-plane credentials lack instance read permission on the project.","commonSituations":"Stale/replayed bootstrap token referencing a deleted server, node launched in a different project than the control plane's credentials, IAM policy missing InstanceReadOnly, or a transient Scaleway API outage.","solutions":["Confirm the server ID in the node's bootstrap token still exists: scw instance server get <server-id> zone=<zone>","Check control-plane Scaleway IAM credentials include instance read on the node's project","Check network connectivity/proxy between control plane and api.scaleway.com and retry (transient errors)","Ensure node and control plane belong to the same Scaleway project/Organization"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"var scwRespErr *scw.ResponseError\nif errors.As(err, &scwRespErr) && scwRespErr.StatusCode == http.StatusNotFound {\n\tlog.Printf(\"server %s does not exist in zone %s; token stale\", serverID, zone)\n}","typeGuard":"func isNotFound(err error) bool {\n\tvar rerr *scw.ResponseError\n\treturn errors.As(err, &rerr) && rerr.StatusCode == 404\n}","tryCatchPattern":"if err != nil {\n\tvar rerr *scw.ResponseError\n\tif errors.As(err, &rerr) {\n\t\tswitch rerr.StatusCode {\n\t\tcase 404:\n\t\t\t// stale token / deleted server\n\t\tcase 403:\n\t\t\t// IAM permission missing\n\t\t}\n\t}\n\treturn fmt.Errorf(\"failed to get server %s: %w\", serverID, err)\n}","preventionTips":["Keep node and control plane in the same Scaleway project","Ensure control-plane IAM includes InstanceReadOnly","Re-request bootstrap if a node's token is stale; reissue tokens after server recreation"],"tags":["scaleway","instance","api","bootstrap"],"backgroundTag":"cloud-resource-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"}