Skip to content

Commit 5215248

Browse files
committed
feat(instance_server): default to sbs volume root volume, even if l_ssd is available
l_ssd servers are planned to disappear with the arrival of high perfomance block.
1 parent c1f09d2 commit 5215248

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

internal/services/instance/helpers_instance.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -508,22 +508,11 @@ func instanceServerAdditionalVolumeTemplate(api *BlockAndInstanceAPI, zone scw.Z
508508
}
509509

510510
func prepareRootVolume(rootVolumeI map[string]any, serverType *instance.ServerType, image string) *UnknownVolume {
511-
serverTypeCanBootOnBlock := serverType.VolumesConstraint.MaxSize == 0
512-
513511
rootVolumeIsBootVolume := types.ExpandBoolPtr(types.GetMapValue[bool](rootVolumeI, "boot"))
514512
rootVolumeType := types.GetMapValue[string](rootVolumeI, "volume_type")
515513
sizeInput := types.GetMapValue[int](rootVolumeI, "size_in_gb")
516514
rootVolumeID := zonal.ExpandID(types.GetMapValue[string](rootVolumeI, "volume_id")).ID
517515

518-
// If the rootVolumeType is not defined, define it depending on the offer
519-
if rootVolumeType == "" {
520-
if serverTypeCanBootOnBlock {
521-
rootVolumeType = instance.VolumeVolumeTypeSbsVolume.String()
522-
} else {
523-
rootVolumeType = instance.VolumeVolumeTypeLSSD.String()
524-
}
525-
}
526-
527516
rootVolumeName := ""
528517
if image == "" { // When creating an instance from an image, volume should not have a name
529518
rootVolumeName = types.NewRandomName("vol")

0 commit comments

Comments
 (0)