kubernetes/kops · error
unexpected format for server id %s
Error message
unexpected format for server id %s
What it means
getServer parses the node name/id, which kOps expects in the form <provider>/<zone>/<server-id> (3 slash-separated parts). If the id does not split into exactly 3 segments, the zone and server UUID cannot be extracted, so this error is thrown.
Source
Thrown at pkg/nodeidentity/scaleway/identify.go:143
klog.Warningf("Failed to add node identity info to cache: %v", err)
}
}
return info, nil
}
// stringKeyFunc is a string as cache key function
func stringKeyFunc(obj interface{}) (string, error) {
key := obj.(*nodeidentity.Info).InstanceID
return key, nil
}
// getServer queries Scaleway for the server with the specified ID, returning an error if not found
func (i *nodeIdentifier) getServer(ctx context.Context, id string) (*instance.Server, error) {
api := instance.NewAPI(i.client)
uuid := strings.Split(id, "/")
if len(uuid) != 3 {
return nil, fmt.Errorf("unexpected format for server id %s", id)
}
server, err := api.GetServer(&instance.GetServerRequest{
ServerID: uuid[2],
Zone: scw.Zone(uuid[1]),
}, scw.WithContext(ctx))
if err != nil || server == nil {
return nil, fmt.Errorf("failed to get server %s: %w", id, err)
}
return server.Server, nil
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Set the node's providerID/spec.ProviderID to the full 3-part format: '<region>/<zone>/<server-uuid>' (e.g. 'scaleway/fr-par-1/11111111-2222-...')
- Verify how the id is derived upstream and fix the format at the source
- Log/inspect the offending id to confirm the exact number of segments
Example fix
// before id := "11111111-2222-3333-4444-555555555555" // 1 segment // after id := "fr-par-1/11111111-2222-3333-4444-555555555555" // zone + uuid, 3 segments with provider prefix
Defensive patterns
Strategy: validation
Validate before calling
func validateScalewayProviderID(id string) error {
parts := strings.Split(id, "/")
if len(parts) != 3 {
return fmt.Errorf("provider id must be <provider>/<zone>/<uuid>, got %q", id)
}
return nil
} Type guard
func isThreePartID(id string) bool {
return len(strings.Split(id, "/")) == 3
} Prevention
- Always set providerID in the full zone/uuid form when creating nodes
- Validate providerID format in CI for InstanceGroup/node manifests
- Log raw node names/ids when node identity lookup fails
- Keep provider-id conventions consistent across cloud providers in tooling
When it happens
Trigger: Calling IdentifyNode with a node name/id that is a bare UUID or a name with fewer/more than 3 '/'-separated segments instead of the full 'fr-par-1/.../<uuid>' style id.
Common situations: Provider id not set on the Node object (node name used instead); scaleway provider-id malformed in the InstanceGroup or cloud config; ids copied from other clouds with different formats.
Related errors
- creating client for Scaleway NodeIdentifier: %w
- providerID not set for node %s
- providerID %q not recognized for node %s
- found server %s (%s) with unexpected state: %q
- error building metal node identifier: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/b8f8bb6628591675.
Report an issue: GitHub.