yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #26608
[Bug 1332660] Re: Update statistics from computes if RBD ephemeral is used
** Changed in: mos
Status: Fix Committed => Fix Released
--
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/1332660
Title:
Update statistics from computes if RBD ephemeral is used
Status in Mirantis OpenStack:
Fix Released
Status in Mirantis OpenStack 4.1.x series:
Won't Fix
Status in Mirantis OpenStack 5.0.x series:
Fix Released
Status in Mirantis OpenStack 5.1.x series:
Fix Released
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
If we use RBD as the backend for ephemeral drives, compute nodes still calculate their available disk size looking back to the local disks.
This is the path how they do it:
* nova/compute/manager.py
def update_available_resource(self, context):
"""See driver.get_available_resource()
Periodic process that keeps that the compute host's understanding of
resource availability and usage in sync with the underlying hypervisor.
:param context: security context
"""
new_resource_tracker_dict = {}
nodenames = set(self.driver.get_available_nodes())
for nodename in nodenames:
rt = self._get_resource_tracker(nodename)
rt.update_available_resource(context)
new_resource_tracker_dict[nodename] = rt
....................
def _get_resource_tracker(self, nodename):
rt = self._resource_tracker_dict.get(nodename)
if not rt:
if not self.driver.node_is_available(nodename):
raise exception.NovaException(
_("%s is not a valid node managed by this "
"compute host.") % nodename)
rt = resource_tracker.ResourceTracker(self.host,
self.driver,
nodename)
self._resource_tracker_dict[nodename] = rt
return rt
* nova/compute/resource_tracker.py
def update_available_resource(self, context):
"""Override in-memory calculations of compute node resource usage based
on data audited from the hypervisor layer.
Add in resource claims in progress to account for operations that have
declared a need for resources, but not necessarily retrieved them from
the hypervisor layer yet.
"""
LOG.audit(_("Auditing locally available compute resources"))
resources = self.driver.get_available_resource(self.nodename)
* nova/virt/libvirt/driver.py
def get_local_gb_info():
"""Get local storage info of the compute node in GB.
:returns: A dict containing:
:total: How big the overall usable filesystem is (in gigabytes)
:free: How much space is free (in gigabytes)
:used: How much space is used (in gigabytes)
"""
if CONF.libvirt_images_type == 'lvm':
info = libvirt_utils.get_volume_group_info(
CONF.libvirt_images_volume_group)
else:
info = libvirt_utils.get_fs_info(CONF.instances_path)
for (k, v) in info.iteritems():
info[k] = v / (1024 ** 3)
return info
It would be nice to have something like "libvirt_utils.get_rbd_info" which could be used in case CONF.libvirt_images_type == 'rbd'
To manage notifications about this bug go to:
https://bugs.launchpad.net/mos/+bug/1332660/+subscriptions