{"record":{"id":"3f312fc09ce21f8c","repo":"kubernetes/kops","slug":"error-building-neutron-client-w","errorCode":null,"errorMessage":"error building neutron client: %w","messagePattern":"error building neutron client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/cloud.go","lineNumber":394,"sourceCode":"\t// used when no cluster is available\n\treturn buildClients(provider, nil, nil, config, region, false)\n}\n\nfunc buildClients(provider *gophercloud.ProviderClient, tags map[string]string, spec *kops.OpenstackSpec, config vfs.OpenstackConfig, region string, hasDNS bool) (OpenstackCloud, error) {\n\tcinderClient, err := openstack.NewBlockStorageV3(provider, gophercloud.EndpointOpts{\n\t\tType:   \"volumev3\",\n\t\tRegion: region,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building cinder client: %w\", err)\n\t}\n\n\tneutronClient, err := openstack.NewNetworkV2(provider, gophercloud.EndpointOpts{\n\t\tType:   \"network\",\n\t\tRegion: region,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building neutron client: %w\", 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: %w\", err)\n\t}\n\t// 2.47 is the minimum version where the compute API /server/details returns flavor names\n\tnovaClient.Microversion = \"2.47\"\n\n\tglanceClient, err := openstack.NewImageV2(provider, gophercloud.EndpointOpts{\n\t\tType:   \"image\",\n\t\tRegion: region,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building glance client: %w\", err)","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/cloud.go#L376-L412","documentation":"buildClients (upup/pkg/fi/cloudup/openstack/cloud.go:394) builds the Neutron networking v2 client with openstack.NewNetworkV2 and EndpointOpts{Type: \"network\", Region: region}. It fails when the authenticated service catalog contains no network endpoint matching that type and region. Wrapped with %w, the root cause (typically gophercloud ErrEndpointNotFound) is preserved.","triggerScenarios":"No 'network' service entry in the catalog for the region; Networking (Neutron) not deployed in that region; region mismatch between OS_REGION_NAME and the endpoint's region attribute; catalog corrupted or the endpoint's type renamed.","commonSituations":"Minimal OpenStach installs without Neutron (compute-only); multi-region clouds where only some regions run Neutron; case/typo issues in the region option; a proxy exposing only some services.","solutions":["Run `openstack endpoint list --service network --region <region>` to confirm the endpoint exists","Correct OS_REGION_NAME to a region where Neutron is deployed","Deploy/register the Neutron service in the region if missing","Check endpoint interface visibility (public vs internal) matches the client's endpoint type preference"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"endpoints, err := catalogEndpoints(token, \"network\")\nif err != nil || len(endpoints) == 0 {\n    return fmt.Errorf(\"no network endpoint for region %q\", region)\n}\nreturn nil","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm Neutron is deployed in the target region before kops","Verify `openstack endpoint list --service network --region <region>`","Use exact region names from `openstack region list`","Ensure the project's catalog is not restricted from the network service"],"tags":["openstack","neutron","endpoint","service-catalog","gophercloud"],"backgroundTag":"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"}