mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
[Usage] Fix wrong usage_type (#7229)
This commit is contained in:
parent
8592de95fa
commit
ad64ee3090
@ -1574,3 +1574,12 @@ CREATE VIEW `cloud`.`user_view` AS
|
|||||||
-- Remove snapshot references if primary storage pool has been removed, see github issue #7093
|
-- Remove snapshot references if primary storage pool has been removed, see github issue #7093
|
||||||
DELETE FROM `cloud`.`snapshot_store_ref`
|
DELETE FROM `cloud`.`snapshot_store_ref`
|
||||||
WHERE store_role = "Primary" AND store_id IN (SELECT id FROM storage_pool WHERE removed IS NOT NULL);
|
WHERE store_role = "Primary" AND store_id IN (SELECT id FROM storage_pool WHERE removed IS NOT NULL);
|
||||||
|
|
||||||
|
|
||||||
|
-- Change usage of VM_DISK_IO_WRITE to use right usage_type
|
||||||
|
UPDATE
|
||||||
|
`cloud_usage`.`cloud_usage`
|
||||||
|
SET
|
||||||
|
usage_type = 22
|
||||||
|
WHERE
|
||||||
|
usage_type = 24 AND usage_display like '% io write';
|
||||||
@ -134,7 +134,7 @@ public class VmDiskUsageParser {
|
|||||||
usageDesc += " for Vm: " + vmId + " and Volume: " + volumeId;
|
usageDesc += " for Vm: " + vmId + " and Volume: " + volumeId;
|
||||||
}
|
}
|
||||||
usageRecord =
|
usageRecord =
|
||||||
new UsageVO(vmDiskInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, ioWrite + " io write", UsageTypes.VM_DISK_BYTES_WRITE,
|
new UsageVO(vmDiskInfo.getZoneId(), account.getId(), account.getDomainId(), usageDesc, ioWrite + " io write", UsageTypes.VM_DISK_IO_WRITE,
|
||||||
new Double(ioWrite), vmId, null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, "VirtualMachine");
|
new Double(ioWrite), vmId, null, null, null, vmDiskInfo.getVolumeId(), startDate, endDate, "VirtualMachine");
|
||||||
usageRecords.add(usageRecord);
|
usageRecords.add(usageRecord);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user