apache / apache/cloudstack

VOLUME.CHANGE.DISK.OFFERING does not generate VOLUME.RESIZE usage event when volume size remains unchanged

未关闭
#13,734 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
component:usage-server type:improvement
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

### problem

When a volume's disk offering is changed to another offering with the same size, CloudStack does not emit a VOLUME.RESIZE event in cloud.usage_event

### versions

ACS version is 4.19.1.1

### The steps to reproduce the bug

Steps to reproduce:

Case 1 - Resized volume, same capacity after disk offering change

- Create Volume A using Disk Offering A with an initial size of 300 GB.
- Resize the volume to 400 GB.
- Change the disk offering from Disk Offering A to Disk Offering B, while keeping the volume size at 400 GB.
Result: The disk offering change completed successfully, but no new VOLUME.RESIZE usage event was generated.

Case 2 - Fixed-size disk offerings with the same capacity

- Create Volume A using Disk Offering A with a fixed size of 400 GB.
- Change the disk offering to Disk Offering B, which also has a fixed size of 400 GB.
Result: The disk offering was updated successfully, but no VOLUME.RESIZE usage event was generated.

Case 3 - Custom-size disk offerings with the same capacity

- Create Volume A using Disk Offering A with a custom size of 400 GB.
- Change the disk offering to Disk Offering B, while keeping the volume size at 400 GB.
Result: The disk offering change completed successfully, however no VOLUME.RESIZE usage event was generated.

Case 4 - Disk offering change with a different volume size

- Create Volume A using Disk Offering A with a size of 300 GB.
- Change the volume to Disk Offering B and increase the volume size to 400 GB as part of the same operation.
Result: CloudStack generated both the VOLUME.CHANGE.DISK.OFFERING event and a new VOLUME.RESIZE usage event, and the billing information was updated correctly.

Actual behaviour:

CloudStack generates a `VOLUME.CHANGE.DISK.OFFERING` event in the `cloud.event` table, confirming that the operation completed successfully.

However, no new `VOLUME.RESIZE` entry is created in the `cloud.usage_event` table.

As a result, the usage records continue to reference the previous disk offering, and downstream billing continues to use the old offering information.

Additional observations:

- The volume is successfully updated to Disk Offering B.
- The volume size remains unchanged.
- The latest `cloud.usage_event` entry still references Disk Offering A.
- Billing data derived from `cloud.usage_event` therefore continues to report the previous offering.

### What to do about it?

Expected behaviour:

A usage event should be generated (or the existing usage information updated) so that the billing system reflects the new disk offering, even though the volume size has not changed.

贡献指南

打开贡献指南

调研方向

跟踪 cloud.event 和 cloud.usage_event 中的磁盘供给变更路径,以及对 VOLUME.CHANGE.DISK.OFFERING 和 VOLUME.RESIZE 的处理。先复现大小相同的情况,然后验证即使卷大小未发生变化,更改供给也会将使用量记录到新的供给上。

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

评估

技术栈
java
领域
backend-api-design, cloud
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
50/100

把新 issue 发到你的邮箱

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