apache / apache/cloudstack

Custom IOPS not applied to root disk when deploying a VM from a template

未关闭
#14,103 0 条评论 0 个 reaction 已指派 0 人 已被 @xujiantop-crypto 认领 在 GitHub 查看
bug
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

### problem

### Description

When a user deploys a VM from a template with a Custom IOPS offering for the ROOT disk, the min IOPS and max IOPS entered in Deploy Instance are stored in VM details but not copied to the ROOT volume.
volumes.min_iops and volumes.max_iops stay empty. Vendor storage that reads IOPS from the volumes gets null for min IOPS and max IOPS instead of the values entered at deploy.

### Root Cause
The UI sends custom IOPS as details[0].minIops and details[0].maxIops. CloudStack stores them in vm_instance_details with those same names (minIops / maxIops).

When the ROOT volume is created, CloudOrchestrator.createVirtualMachine() reads IOPS using the API constants MIN_IOPS and MAX_IOPS. Those constants are miniops and maxiops.

The names do not match, so the lookup finds nothing. DiskOfferingInfo is left with no IOPS, and VolumeOrchestrator creates the ROOT volume with empty min_iops / max_iops.

It is a regression from Apache CloudStack PR: https://github.com/apache/cloudstack/pull/8800 (April 2024).

Image

### Observations:

vm_instance_details has minIops / maxIops

Image

ROOT volume min_iops / max_iops are NULL

Image

### versions

CloudStack: 4.20 and later, including 4.23.

### The steps to reproduce the bug

1. Go to Instances → Add Instance.
2. Select a template (do not use ISO).
3. In Compute offering, set Override root disk offering to true and select the Custom IOPS disk offering for the ROOT disk.
4. Enter min IOPS and max IOPS (for example, 100 and 1000).
5. Complete the wizard and deploy the VM.
6. After the VM is created, check the ROOT volume and VM details

### What to do about it?

### Impact

- The VM deploys with no error even though min and max IOPS are not applied on the ROOT volume.
- Expected IOPS are not served because custom min/max IOPS are not set on the ROOT volume, so there is no IOPS guarantee.

### Expected Behaviour
Custom IOPS from deploy-VM details must be applied to the root volume 

贡献指南

打开贡献指南

调研方向

从 CloudOrchestrator.createVirtualMachine() 开始,跟踪 vm_instance_details 中的值如何被读入 DiskOfferingInfo。将详细信息名称 minIops/maxIops 与 API 常量 MIN_IOPS 和 MAX_IOPS 进行比较,然后验证 ROOT 卷在部署期间是否接收到这两个值。通过链接的 pull request 和使用自定义 IOPS 的部署测试确认 fix。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
backend, infrastructure
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。