Swap partition is a disk space that is not available for storing any
kind of data other than memory dumps. So - I think it is perfectly fine
to assume that the size of swap sums up with used space.

** Changed in: nova
       Status: New => Invalid

-- 
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/1615903

Title:
  free_disk_gb is not correctly, because swap disk size is not  minus.

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  1. code in compute/resource_tracker.py

  def _update_usage(self, usage, sign=1):
          mem_usage = usage['memory_mb']
          disk_usage = usage.get('root_gb', 0)

          overhead = self.driver.estimate_instance_overhead(usage)
          mem_usage += overhead['memory_mb']
          disk_usage += overhead.get('disk_gb', 0)

          self.compute_node.memory_mb_used += sign * mem_usage
          self.compute_node.local_gb_used += sign * disk_usage
          self.compute_node.local_gb_used += sign * usage.get('ephemeral_gb', 0)
          self.compute_node.vcpus_used += sign * usage.get('vcpus', 0)

          # free ram and disk may be negative, depending on policy:
          self.compute_node.free_ram_mb = (self.compute_node.memory_mb -
                                           self.compute_node.memory_mb_used)
          self.compute_node.free_disk_gb = (self.compute_node.local_gb -
                                            self.compute_node.local_gb_used)

          self.compute_node.running_vms = self.stats.num_instances

  2. So I think self.compute_node.local_gb_used is contained swap disk
  size. And free_disk_gb is not minus swap disk size.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to