← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1315988] [NEW] report disk consumption incorrect in nova-compute

 

Public bug reported:

I have following flavor
jichen@controller:~$ nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1  | m1.tiny   | 512       | 1    | 0         |      | 1     | 1.0         | True      |
| 11 | t.test1   | 512       | 1    | 5         |      | 1     | 1.0         | True      |
| 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      |
| 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      |
| 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      |
| 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

I used following command
nova boot --flavor 11 --key_name mykey --image 47b00a69-ba84-4dce-bc7e-72ffc5a5d93e --ephemeral 2 t6

so the disk consumption is 2G instead of 5G


but I added following logs:
def _update_usage(self, resources, usage, sign=1):
        mem_usage = usage['memory_mb']

        overhead = self.driver.estimate_instance_overhead(usage)
        mem_usage += overhead['memory_mb']

        resources['memory_mb_used'] += sign * mem_usage
        resources['local_gb_used'] += sign * usage.get('root_gb', 0)
        resources['local_gb_used'] += sign * usage.get('ephemeral_gb', 0)

        LOG.audit(_("------%s %s------") % (usage.get('ephemeral_gb',
0), usage.get('root_gb', 0)))


I got following info in the log
2014-05-05 11:27:12.105 5209 AUDIT nova.compute.resource_tracker [-] ------5 1------


so the free disk was changed from 
2014-05-05 10:16:16.174 3033 AUDIT nova.compute.resource_tracker [-] Free disk (GB): 35

to

2014-05-05 10:16:16.174 3033 AUDIT nova.compute.resource_tracker [-]
Free disk (GB): 29

** Affects: nova
     Importance: Undecided
     Assignee: jichenjc (jichenjc)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => jichenjc (jichenjc)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1315988

Title:
  report disk consumption incorrect in nova-compute

Status in OpenStack Compute (Nova):
  New

Bug description:
  I have following flavor
  jichen@controller:~$ nova flavor-list
  +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
  | ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
  +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
  | 1  | m1.tiny   | 512       | 1    | 0         |      | 1     | 1.0         | True      |
  | 11 | t.test1   | 512       | 1    | 5         |      | 1     | 1.0         | True      |
  | 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      |
  | 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      |
  | 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      |
  | 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      |
  +----+-----------+-----------+------+-----------+------+-------+-------------+-----------+

  I used following command
  nova boot --flavor 11 --key_name mykey --image 47b00a69-ba84-4dce-bc7e-72ffc5a5d93e --ephemeral 2 t6

  so the disk consumption is 2G instead of 5G

  
  but I added following logs:
  def _update_usage(self, resources, usage, sign=1):
          mem_usage = usage['memory_mb']

          overhead = self.driver.estimate_instance_overhead(usage)
          mem_usage += overhead['memory_mb']

          resources['memory_mb_used'] += sign * mem_usage
          resources['local_gb_used'] += sign * usage.get('root_gb', 0)
          resources['local_gb_used'] += sign * usage.get('ephemeral_gb', 0)

          LOG.audit(_("------%s %s------") % (usage.get('ephemeral_gb',
  0), usage.get('root_gb', 0)))

  
  I got following info in the log
  2014-05-05 11:27:12.105 5209 AUDIT nova.compute.resource_tracker [-] ------5 1------

  
  so the free disk was changed from 
  2014-05-05 10:16:16.174 3033 AUDIT nova.compute.resource_tracker [-] Free disk (GB): 35

  to

  2014-05-05 10:16:16.174 3033 AUDIT nova.compute.resource_tracker [-]
  Free disk (GB): 29

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1315988/+subscriptions


Follow ups

References