Skip to content

Usage for Default Network offerings are created with usage_id 1 #10697

Open
@rajujith

Description

@rajujith

problem

The usage_id in the cloud_usage table for the resource network offering for the default network offerings is always 1 and seems hardcoded.

mysql> select distinct usage_id from cloud_usage where usage_type=13;
+----------+
| usage_id |
+----------+
|        1 |
+----------+

mysql> select * from cloud_usage.cloud_usage where usage_type=13 and usage_id=1 order by id desc limit 2\G
*************************** 1. row ***************************
              id: 11500
         zone_id: 1
      account_id: 2
       domain_id: 1
     description: Network offering:10 for Vm : 132 usage time
   usage_display: 0.038889 Hrs
      usage_type: 13
       raw_usage: 0.038889169692993164
  vm_instance_id: 132
         vm_name: NULL
     offering_id: 10
     template_id: NULL
        usage_id: 1
            type: NULL
            size: NULL
      network_id: NULL
      start_date: 2025-04-10 05:30:00
        end_date: 2025-04-10 06:29:59
    virtual_size: NULL
       cpu_speed: NULL
       cpu_cores: NULL
          memory: NULL
quota_calculated: 0
       is_hidden: 0
           state: NULL

versions

4.19.2

The steps to reproduce the bug

  1. Deploy instances
  2. Check usage records

...

What to do about it?

I am expecting the usage_id should be resource_id i.e, the offering id.

Metadata

Metadata

Type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions