Usage never set volume as deleted and when volume is resized, it is charge twice (or more)
Cenario 1:
Create a volume and attach it on vm.
Remove volume.
It will be charged forever
Cenario 2:
Create a volume and attach it on vm.
Resive volume.
It will be charged for many times that you resize it
Stop to charge volume when it is removed.
Volume is being charged when it is removed or being charged more than 24 hours.
# > list usagerecords domainid=8e1c4859-9cf4-4414-a218-160b05b9f157 accountid=3e64effb-12a6-4642-95f9-c217c804a3c4 type=6 startdate=2020-01-19 enddate=2020-01-19
{
"account": "21150",
"accountid": "3e64effb-12a6-4642-95f9-c217c804a3c4",
"description": "Volume usage for DATA-600 (40f8412b-65f5-4c2d-a6e3-00a4e0456279) with disk offering Disco Magnético (34573d38-2dce-4d8b-a0b4-80ad61b1cbc8) and size (1000.00 GB) 1073741824000",
"domain": "skycloud.prv",
"domainid": "8e1c4859-9cf4-4414-a218-160b05b9f157",
"enddate": "2020-01-19'T'23:59:59-03:00",
"offeringid": "34573d38-2dce-4d8b-a0b4-80ad61b1cbc8",
"rawusage": "48",
"size": 1073741824000,
"startdate": "2020-01-19'T'00:00:00-03:00",
"tags": [],
"usage": "48 Hrs",
"usageid": "40f8412b-65f5-4c2d-a6e3-00a4e0456279",
"usagetype": 6,
"zoneid": "74c526f8-52a2-4e2e-8d08-76eae35913a4"
},
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
N/A
OS / ENVIRONMENT
centos 7
SUMMARY
Usage never set volume as deleted and when volume is resized, it is charge twice (or more)
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS