Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-6466

cpu and ram is not getting updated correctly in usage_vm_instance table for usage type 2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.4.0
    • 4.4.0
    • Usage
    • Security Level: Public (Anyone can view this level - this is the default.)
    • None

    Description

      steps to reproduce
      ==================
      1-prepare a cs setup with xen server
      2-create a dynamic compute offering
      3-deploy a vm with dynamic compute offerings(cpu=500,ram=513
      4- scale the vm to regular compute offerings(cpu=1000 ram=1024)
      5- check the usage_vm_instance table in usage db

      expected:
      =========
      value of cpu and ram should be same for resource usage_type 1 and 2.

      Actual:
      =======
      cpu and ram set to null for usage_type 1 , but usage_type 2 is holding the old value(before scaling up)

      DB
      ===
      mysql> select * from usage_vm_instance where vm_instance_id=10;
      -------------------------------------------------------------------------------------------------------------------------------------------------------------

      usage_type zone_id account_id vm_instance_id vm_name service_offering_id template_id hypervisor_type start_date end_date cpu_speed cpu_cores memory

      -------------------------------------------------------------------------------------------------------------------------------------------------------------

      1 1 2 10 USG4 13 5 XenServer 2014-02-24 17:13:11 2014-02-24 17:13:33 300 1 512
      1 1 2 10 USG4 2 5 XenServer 2014-02-24 17:13:33 NULL NULL NULL NULL
      2 1 2 10 USG4 13 5 XenServer 2014-02-24 17:12:38 2014-02-24 17:13:33 300 1 512
      2 1 2 10 USG4 2 5 XenServer 2014-02-24 17:13:33 NULL 300 1 512

      -------------------------------------------------------------------------------------------------------------------------------------------------------------
      4 rows in set (0.00 sec)

      Attachments

        Activity

          People

            harikrishna.patnala Harikrishna Patnala
            harikrishna.patnala Harikrishna Patnala
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: