{"record":{"id":"9959baeb2f6fed56","repo":"kubernetes/kops","slug":"failed-to-get-info-for-server-q-w-9959ba","errorCode":null,"errorMessage":"failed to get info for server %q: %w","messagePattern":"failed to get info for server %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/verifier.go","lineNumber":132,"sourceCode":"\treturn kubernetes.NewForConfig(config)\n}\n\n// readKubeConfig ...\nfunc readKubeConfig() (*restclient.Config, error) {\n\treturn clientcmd.NewNonInteractiveDeferredLoadingClientConfig(\n\t\tclientcmd.NewDefaultClientConfigLoadingRules(),\n\t\t&clientcmd.ConfigOverrides{}).ClientConfig()\n}\n\nfunc (o openstackVerifier) VerifyToken(ctx context.Context, rawRequest *http.Request, token string, body []byte) (*bootstrap.VerifyResult, error) {\n\tif !strings.HasPrefix(token, openstackmetadata.OpenstackAuthenticationTokenPrefix) {\n\t\treturn nil, bootstrap.ErrNotThisVerifier\n\t}\n\tserverID := strings.TrimPrefix(token, openstackmetadata.OpenstackAuthenticationTokenPrefix)\n\n\tinstance, err := servers.Get(ctx, o.novaClient, serverID).Extract()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get info for server %q: %w\", token, err)\n\t}\n\n\tvar addrs []string\n\n\tvar addresses map[string][]Address\n\terr = mapstructure.Decode(instance.Addresses, &addresses)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to decode addresses: %w\", err)\n\t}\n\n\tfor _, addrList := range addresses {\n\t\tfor _, props := range addrList {\n\t\t\taddrs = append(addrs, props.Addr)\n\t\t}\n\t}\n\t// ensure that request is coming from same machine\n\trequestAddr, _, err := net.SplitHostPort(rawRequest.RemoteAddr)\n\tif err != nil {","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/verifier.go#L114-L150","documentation":"Thrown by VerifyToken when servers.Get fails to fetch the Nova server record identified by the token (the token is the prefix plus a server ID). During instance metadata authentication the verifier must confirm the requesting server exists in Nova; any Nova API error (404, auth failure, network) surfaces wrapped here.","triggerScenarios":"VerifyToken strips openstackmetadata.OpenstackAuthenticationTokenPrefix from the token and calls servers.Get(ctx, o.novaClient, serverID).Extract(); the call errors when the server doesn't exist (404), the verifier's Nova credentials expired, the region/client is wrong, or the network call fails.","commonSituations":"Node terminated/replaced between token issuance and verification; verifier's Nova client built for a different region than the node; stale token with an outdated server ID; Keystone/Nova auth expiry on the verifier's client.","solutions":["Check the wrapped error: 404 means the server ID in the token doesn't exist in this region — verify the Nova client's region config.","Have the node re-fetch its metadata token and retry bootstrap verification.","Confirm the verifier's Nova credentials are valid (401 indicates expired tokens).","Ensure requests are routed to a verifier configured for the correct cluster/region."],"exampleFix":"// before\ninstance, err := servers.Get(ctx, o.novaClient, serverID).Extract()\nif err != nil {\n    return nil, fmt.Errorf(\"failed to get info for server %q: %w\", token, err)\n}\n// after\ninstance, err := servers.Get(ctx, o.novaClient, serverID).Extract()\nif err != nil {\n    if gophercloud.ResponseCodeIs(err, http.StatusNotFound) {\n        return nil, bootstrap.ErrTokenNotFound\n    }\n    return nil, fmt.Errorf(\"failed to get info for server %q: %w\", token, err)\n}","handlingStrategy":"retry","validationCode":"if !strings.HasPrefix(token, openstackmetadata.OpenstackAuthenticationTokenPrefix) {\n    return nil, bootstrap.ErrNotThisVerifier\n}","typeGuard":null,"tryCatchPattern":"instance, err := servers.Get(ctx, o.novaClient, serverID).Extract()\nif err != nil {\n    if gophercloud.ResponseCodeIs(err, http.StatusNotFound) {\n        return nil, bootstrap.ErrTokenNotFound\n    }\n    return nil, fmt.Errorf(\"failed to get info for server %q: %w\", token, err)\n}","preventionTips":["Ensure the Nova client region matches the node's region","Refresh verifier credentials before long verification windows","Have nodes re-request metadata tokens after replacement/resize"],"tags":["openstack","nova","authentication","metadata"],"backgroundTag":"resource-lookup-failed","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"}