kubernetes/kops · error

unable to parse Scaleway zone %q: %w

Error message

unable to parse Scaleway zone %q: %w

What it means

In VerifyToken, scw.Zone could not be constructed from the zone string found in the server's metadata — the metadata returned a malformed or SDK-unknown zone identifier, so the zone needed to target API calls for this node is unusable.

Source

Thrown at upup/pkg/fi/cloudup/scaleway/verifier.go:74

	return &scalewayVerifier{
		scwClient: scwClient,
	}, nil
}

func (v scalewayVerifier) VerifyToken(ctx context.Context, rawRequest *http.Request, token string, body []byte) (*bootstrap.VerifyResult, error) {
	if !strings.HasPrefix(token, scalewaymetadata.ScalewayAuthenticationTokenPrefix) {
		return nil, bootstrap.ErrNotThisVerifier
	}
	serverID := strings.TrimPrefix(token, scalewaymetadata.ScalewayAuthenticationTokenPrefix)

	metadataAPI := instance.NewMetadataAPI()
	metadata, err := metadataAPI.GetMetadata()
	if err != nil {
		return nil, fmt.Errorf("failed to retrieve server metadata: %w", err)
	}
	zone, err := scw.ParseZone(metadata.Location.ZoneID)
	if err != nil {
		return nil, fmt.Errorf("unable to parse Scaleway zone %q: %w", metadata.Location.ZoneID, err)
	}
	region, err := zone.Region()
	if err != nil {
		return nil, fmt.Errorf("unable to determine region from zone %s", zone)
	}

	profile, err := scalewaymetadata.CreateValidScalewayProfile()
	if err != nil {
		return nil, err
	}
	scwClient, err := scw.NewClient(
		scw.WithProfile(profile),
		scw.WithUserAgent(KopsUserAgentPrefix+kopsv.Version),
	)
	if err != nil {
		return nil, fmt.Errorf("creating client for Scaleway Verifier: %w", err)
	}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check the wrapped error and the metadata-reported zone value
  2. Verify the node's zone matches zones known to the vendored Scaleway SDK
  3. Update kOps so the SDK version knows the node's zone
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/scaleway/verifier.go:74 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/6a4dae0db771cedd. Report an issue: GitHub.