Skip to content
Snippets Groups Projects
Commit 6eb6419b authored by Luis Pigueiras's avatar Luis Pigueiras :tools:
Browse files

Merge branch 'release-3.2' into 'master'

Release 3.2

- Force service restart in updates
- Add gigabytes quota information in cinder

See merge request !28
parents d295905b d9f5fe2f
No related branches found
No related tags found
No related merge requests found
Name: openstack-db-logger
Version: 3.1
Release: 2%{?dist}
Version: 3.2
Release: 1%{?dist}
Summary: Tool for accounting resources in openstack reading from the DBs
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
......@@ -47,6 +47,9 @@ CFLAGS="%{optflags}" %{__python} setup.py build
%preun
%systemd_preun dblogger.service
%postun
%systemd_postun_with_restart dblogger.service
%files
%defattr(-,root,root,-)
%{_bindir}/dblogger
......@@ -60,6 +63,10 @@ CFLAGS="%{optflags}" %{__python} setup.py build
%changelog
* Mon Dec 12 2016 Luis Pigueiras <luis.pigueiras@cern.ch> 3.2-1
- [OS-3924] Added gb volume quota per type and project
- [OS-3912] Force dblogger restart after update
* Thu Dec 08 2016 Luis Pigueiras <luis.pigueiras@cern.ch> 3.1-1
- [OS-3907] Fix created/deleted in last hour metric
- [OS-3721] Add manila share count
......
......@@ -4,7 +4,7 @@ from distutils.core import setup
setup(
name='openstack-db-logger',
version='3.1',
version='3.2',
description='Tool for sending OpenStack usage to Flume',
author='Cloud Infrastructure Team',
author_email='cloud-infrastructure-3rd-level@cern.ch',
......
......@@ -71,6 +71,19 @@ class Cinder(Base):
"quota": quota_limit,
"usage": quota_usage,
})
elif row.resource.startswith('gigabytes_'):
# We get the volume type from names like volumes_cpio1
volume_type = row.resource.split('_')[1]
result = produce_metric(
metric='volumes_gb_quota_per_type_per_project',
headers={
'type': volume_type,
'project_id': row.project_id
},
values={
"quota": quota_limit,
"usage": quota_usage,
})
else:
continue # Ignore snapshot types and backups
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment