kubernetes/kops · error
error building glance client: %w
Error message
error building glance client: %w
What it means
buildClients (upup/pkg/fi/cloudup/openstack/cloud.go:412) builds the Glance image v2 client with openstack.NewImageV2 and EndpointOpts{Type: "image", Region: region}. It fails when the Keystone catalog has no image service v2 endpoint for that region. Wrapped with %w, so the underlying gophercloud error (usually ErrEndpointNotFound) is preserved for inspection.
Source
Thrown at upup/pkg/fi/cloudup/openstack/cloud.go:412
return nil, fmt.Errorf("error building neutron client: %w", err)
}
novaClient, err := openstack.NewComputeV2(provider, gophercloud.EndpointOpts{
Type: "compute",
Region: region,
})
if err != nil {
return nil, fmt.Errorf("error building nova client: %w", err)
}
// 2.47 is the minimum version where the compute API /server/details returns flavor names
novaClient.Microversion = "2.47"
glanceClient, err := openstack.NewImageV2(provider, gophercloud.EndpointOpts{
Type: "image",
Region: region,
})
if err != nil {
return nil, fmt.Errorf("error building glance client: %w", err)
}
var dnsClient *gophercloud.ServiceClient
if hasDNS {
dnsClient, err = openstack.NewDNSV2(provider, gophercloud.EndpointOpts{
Type: "dns",
Region: region,
})
if err != nil {
return nil, fmt.Errorf("error building dns client: %w", err)
}
}
c := &openstackCloud{
cinderClient: cinderClient,
neutronClient: neutronClient,
novaClient: novaClient,
dnsClient: dnsClient,View on GitHub (pinned to 4c8573c808)
Solutions
- Check `openstack endpoint list --service image --region <region>` for a v2 (image) endpoint
- Set OS_REGION_NAME to the region where Glance v2 is deployed
- Register an image v2 endpoint or upgrade Glance from v1 if missing
- Ensure the chosen endpoint interface (public/internal) is reachable from the machine running kops
Defensive patterns
Strategy: validation
Validate before calling
endpoints, err := catalogEndpoints(token, "image")
if err != nil || len(endpoints) == 0 {
return fmt.Errorf("no image v2 endpoint for region %q", region)
}
return nil Prevention
- Verify `openstack endpoint list --service image --region <region>` before kops
- Upgrade Glance v1-only clouds to v2
- Use exact region names from `openstack region list`
- Confirm the image service is visible in the project's service catalog
When it happens
Trigger: No 'image' type endpoint in the catalog for the region; only Glance v1 deployed (NewImageV2 requires v2); region mismatch between the configured region and the endpoint's region attribute; catalog entry disabled or interface unreachable.
Common situations: Legacy clouds still on Glance v1; multi-region deployments where the image service lives in a single region; region-name casing mismatch; restricted catalogs that hide the image service from the authenticating project.
Related errors
- error building cinder client: %w
- error building neutron client: %w
- error building nova client: %w
- failed to extract storage availability zones: %v
- error building dns client: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/ea552b3d374f23c0.
Report an issue: GitHub.