kubernetes/kops · error

rendering volume: %w

Error message

rendering volume: %w

What it means

kOps wraps errors from the Scaleway instance API when creating a new volume in RenderScw. The CreateVolume call failed inside scaleway-sdk-go; kOps reports it as a 'rendering' failure because it happens while rendering the volume task during a `kops update cluster` run.

Source

Thrown at upup/pkg/fi/cloudup/scalewaytasks/volume.go:131

			VolumeID: fi.ValueOf(actual.ID),
			Name:     expected.Name,
			Tags:     new(expected.Tags),
			Size:     scw.SizePtr(scw.Size(fi.ValueOf(expected.Size))),
		})
		if err != nil {
			return fmt.Errorf("updating volume %s (%s): %w", *actual.Name, *actual.ID, err)
		}

	} else {
		_, err := instanceService.CreateVolume(&instance.CreateVolumeRequest{
			Zone:       zone,
			Name:       fi.ValueOf(expected.Name),
			VolumeType: instance.VolumeVolumeType(fi.ValueOf(expected.Type)),
			Size:       scw.SizePtr(scw.Size(fi.ValueOf(expected.Size))),
			Tags:       expected.Tags,
		})
		if err != nil {
			return fmt.Errorf("rendering volume: %w", err)
		}
	}

	return nil
}

type terraformVolume struct {
	Name     *string  `cty:"name"`
	SizeInGB *int     `cty:"size_in_gb"`
	Type     *string  `cty:"type"`
	Tags     []string `cty:"tags"`
	Boot     *bool    `cty:"boot"`
}

func (_ *Volume) RenderTerraform(t *terraform.TerraformTarget, actual, expected, changes *Volume) error {
	tfName := strings.ReplaceAll(fi.ValueOf(expected.Name), ".", "-")
	tf := &terraformVolume{
		Name:     expected.Name,

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Inspect the wrapped SDK error; if it is a quota/limit error, raise the volume quota for your Scaleway project or reduce the requested size.
  2. Verify the zone in the cluster spec is a valid Scaleway availability zone for the project.
  3. Confirm the volume type (e.g. sbs_volume/legacy b_ssd) is valid for the account; older types may be deprecated.
  4. Retry after a transient 429/5xx; use exponential backoff via re-running `kops update cluster`.

Example fix

// before: unsupported/legacy type
volumeType: b_ssd
// after: current supported type
volumeType: sbs_volume
Defensive patterns

Strategy: validation

Validate before calling

// validate zone and size before CreateVolume
validZones := map[string]bool{"fr-par-1": true, "nl-ams-1": true, "pl-waw-2": true}
if !validZones[zone] {
    return fmt.Errorf("invalid Scaleway zone %q", zone)
}
if fi.ValueOf(expected.Size) < minVolumeGB {
    return fmt.Errorf("volume size %d below Scaleway minimum", fi.ValueOf(expected.Size))
}

Try / catch

vol, err := instanceService.CreateVolume(&instance.CreateVolumeRequest{...})
if err != nil {
    var apiErr *sdk.Error
    if errors.As(err, &apiErr) && (apiErr.StatusCode == 429 || apiErr.StatusCode >= 500) {
        // retry with backoff
    }
    return fmt.Errorf("rendering volume: %w", err)
}

Prevention

When it happens

Trigger: RenderScw determines the volume does not exist yet and calls instanceService.CreateVolume with zone/name/type/size/tags; the Scaleway API rejects or fails — invalid zone, quota exceeded, invalid volume type, or transient API error.

Common situations: Cluster spec targets a zone where the project has no quota; unsupported volume type string in the spec; Scaleway API outage or rate limiting; project limit for total volume size reached.

Related errors


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