You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[cloud_usage] vm_instance_id is null for volume usage (usage_type = 6) #10985
When tracking volume usage in the cloud_usage table (usage_type = 6), the vm_instance_id field is NULL, even if the volume is currently attached to a VM. This leads to potential inaccuracies in historical usage data, especially when volumes are detached and reattached to different VMs.
Expected Behavior: ACS should record the correct vm_instance_id associated with a volume when usage occurs and store it in the cloud_usage table.
versions
The ACS version is 4.19.1.1
The steps to reproduce the bug
Case 1:
Create and attach a volume to VM.
Use the VM for some time (allow usage data to be generated).
Observe that cloud_usage.vm_instance_id is still NULL for this VM.
Case 2:
Create and attach a volume to VM A.
Use the VM for some time (allow usage data to be generated).
Detach the volume and attach it to VM B.
Trigger a reprocessing of usage data for the original time period.
Observe that cloud_usage.vm_instance_id is still NULL.
What to do about it?
Consider enhancing the ACS UsageManagerImpl or submitting a patch upstream to ensure vm_instance_id is consistently captured and stored when usage is recorded.
My goal is to accurately track historical usage of volumes in relation to the VMs they were attached to. To achieve this and mitigate the issue of missing vm_instance_id values for usage_type = 6 in the cloud_usage table.
Hi @DaanHoogland, in Draft PR we are fetching vmId (cloud db) in usage parser which isn't visible to it. Fix will require more work on usage event table and event generation logic.
cc: @sureshanaparti
Activity
boring-cyborg commentedon Jun 6, 2025
Thanks for opening your first issue here! Be sure to follow the issue template!
sudo87 commentedon Jul 15, 2025
@DaanHoogland we have similar ticket #7399 and based on prior discussion on that ticket, it will require functional definition.
DaanHoogland commentedon Jul 15, 2025
I see @sudo87 , but I see no transcript of such discussion. There is a draft PR out by @sureshanaparti . Do you think we can move this forward?
sudo87 commentedon Jul 16, 2025
Hi @DaanHoogland, in Draft PR we are fetching vmId (cloud db) in usage parser which isn't visible to it. Fix will require more work on usage event table and event generation logic.
cc: @sureshanaparti
7 remaining items
DaanHoogland commentedon Nov 12, 2025
fixed by #11531