{"record":{"id":"22730fa3095bb9c8","repo":"kubernetes/kops","slug":"error-building-nova-client-v","errorCode":null,"errorMessage":"error building nova client: %v","messagePattern":"error building nova client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodeidentity/openstack/identify.go","lineNumber":84,"sourceCode":"\tua := gophercloud.UserAgent{}\n\tua.Prepend(\"kops/nodeidentity\")\n\tprovider.UserAgent = ua\n\tklog.V(4).Infof(\"Using user-agent %s\", ua.Join())\n\n\t// node-controller should be able to renew it tokens against OpenStack API\n\tenv.AllowReauth = true\n\n\terr = openstack.Authenticate(context.TODO(), provider, env)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tnovaClient, err := openstack.NewComputeV2(provider, gophercloud.EndpointOpts{\n\t\tType:   \"compute\",\n\t\tRegion: region,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building nova client: %v\", err)\n\t}\n\n\treturn &nodeIdentifier{\n\t\tnovaClient:   novaClient,\n\t\tcache:        expirationcache.NewTTLStore(stringKeyFunc, cacheTTL),\n\t\tcacheEnabled: cacheNodeidentityInfo,\n\t}, nil\n}\n\n// IdentifyNode queries OpenStack for the node identity information\nfunc (i *nodeIdentifier) IdentifyNode(ctx context.Context, node *corev1.Node) (*nodeidentity.Info, error) {\n\tproviderID := node.Spec.ProviderID\n\tif providerID == \"\" {\n\t\treturn nil, fmt.Errorf(\"providerID was not set for node %s\", node.Name)\n\t}\n\tif !strings.HasPrefix(providerID, \"openstack://\") {\n\t\treturn nil, fmt.Errorf(\"providerID %q not recognized for node %s\", providerID, node.Name)\n\t}","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodeidentity/openstack/identify.go#L66-L102","documentation":"New() builds a Nova (compute v2) service client via openstack.NewComputeV2 using the authenticated provider and region. This error wraps any failure creating that client, typically endpoint/catalog or region mismatch issues.","triggerScenarios":"openstack.NewComputeV2 returns an error: no 'compute' service in the auth catalog, no endpoint for the given region, wrong endpoint type ('compute' public/admin/internal mismatch), or the region name does not match any catalog entry.","commonSituations":"OS_REGION_NAME set to a region not present in the service catalog, Keystone catalog lacking compute endpoints, service type renamed (e.g. custom compute service types), or connectivity/auth problems surfacing as endpoint lookup failures.","solutions":["Verify 'openstack catalog list' shows a compute service with an endpoint for the configured region","Correct OS_REGION_NAME to a region that exists in the Keystone catalog","Check the endpoint type is available (public/internal/admin) and adjust network access or EndpointOpts accordingly","Confirm authentication succeeds (try 'openstack server list' with the same credentials)"],"exampleFix":"// before\nexport OS_REGION_NAME=\"WrongRegion\"\n// after\nexport OS_REGION_NAME=\"RegionOne\" # matches keystone catalog","handlingStrategy":"try-catch","validationCode":"// Preflight: confirm a compute endpoint exists for the region before building the identifier.\nout, err := exec.Command(\"openstack\", \"catalog\", \"list\").Output() // or use tokens/client\n// ensure output contains service type 'compute' for OS_REGION_NAME","typeGuard":null,"tryCatchPattern":"id, err := openstack.New()\nif err != nil && strings.Contains(err.Error(), \"error building nova client\") {\n    return fmt.Errorf(\"cannot build nova client; check keystone catalog/region/endpoint: %w\", err)\n}","preventionTips":["Run 'openstack catalog list' with the same credentials to confirm compute endpoints exist","Keep OS_REGION_NAME consistent with the Keystone service catalog regions","Ensure network reachability to the chosen endpoint interface (public/internal/admin)"],"tags":["openstack","nova","node-identity","api-client"],"backgroundTag":"openstack-endpoint-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"}