summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
-rw-r--r--meta-openstack/recipes-devtools/python/python-ceilometer/0001-sqlalchemy-Fix-for-get_statistics-with-postgresql.patch33
-rw-r--r--meta-openstack/recipes-devtools/python/python-ceilometer/ceilometer.conf6
-rw-r--r--meta-openstack/recipes-devtools/python/python-ceilometer_git.bb20
3 files changed, 49 insertions, 10 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer/0001-sqlalchemy-Fix-for-get_statistics-with-postgresql.patch b/meta-openstack/recipes-devtools/python/python-ceilometer/0001-sqlalchemy-Fix-for-get_statistics-with-postgresql.patch
new file mode 100644
index 0000000..2a3ae9d
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-ceilometer/0001-sqlalchemy-Fix-for-get_statistics-with-postgresql.patch
@@ -0,0 +1,33 @@
1From a784cd8f552e1f8ead86230f96e5b9ac8217efea Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Wed, 29 Jan 2014 18:05:46 -0500
4Subject: [PATCH] sqlalchemy: Fix for get_statistics with postgresql
5
6Based on: https://review.openstack.org/#/c/59214/
7
8 Add group by counter_unit in statistics queryI
9 Fixes: bug #1256318
10
11Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
12---
13 ceilometer/storage/impl_sqlalchemy.py | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16diff --git a/ceilometer/storage/impl_sqlalchemy.py b/ceilometer/storage/impl_sqlalchemy.py
17index 8a3deba3a4ea..92d3a5901f5a 100644
18--- a/ceilometer/storage/impl_sqlalchemy.py
19+++ b/ceilometer/storage/impl_sqlalchemy.py
20@@ -574,7 +574,9 @@ class Connection(base.Connection):
21 group_attributes = [getattr(models.Meter, g) for g in groupby]
22 select.extend(group_attributes)
23
24- query = session.query(*select)
25+ #Group by counter_unit for postgresql queries
26+ #In mysql this doesn't change anything because one meter has one unit
27+ query = session.query(*select).group_by(models.Meter.counter_unit)
28
29 if groupby:
30 query = query.group_by(*group_attributes)
31--
321.7.10.4
33
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer/ceilometer.conf b/meta-openstack/recipes-devtools/python/python-ceilometer/ceilometer.conf
index abeb65c..4632f40 100644
--- a/meta-openstack/recipes-devtools/python/python-ceilometer/ceilometer.conf
+++ b/meta-openstack/recipes-devtools/python/python-ceilometer/ceilometer.conf
@@ -65,7 +65,7 @@
65 65
66# Inspector to use for inspecting the hypervisor layer (string 66# Inspector to use for inspecting the hypervisor layer (string
67# value) 67# value)
68#hypervisor_inspector=libvirt 68hypervisor_inspector=libvirt
69 69
70 70
71# 71#
@@ -86,7 +86,7 @@ libvirt_type=kvm
86# 86#
87 87
88# Exchange name for Glance notifications (string value) 88# Exchange name for Glance notifications (string value)
89#glance_control_exchange=glance 89glance_control_exchange=glance
90 90
91 91
92# 92#
@@ -94,7 +94,7 @@ libvirt_type=kvm
94# 94#
95 95
96# Exchange name for Neutron notifications (string value) 96# Exchange name for Neutron notifications (string value)
97#neutron_control_exchange=neutron 97neutron_control_exchange=neutron
98 98
99 99
100# 100#
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
index 41fae5e..cf0d196 100644
--- a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb
@@ -7,20 +7,24 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
7PR = "r0" 7PR = "r0"
8SRCNAME = "ceilometer" 8SRCNAME = "ceilometer"
9 9
10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ 10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=master \
11 file://ceilometer.conf \ 11 file://ceilometer.conf \
12 file://ceilometer.init \ 12 file://ceilometer.init \
13 file://0001-Fix-for-get_resources-with-postgresql.patch \ 13 file://0001-sqlalchemy-Fix-for-get_statistics-with-postgresql.patch \
14 file://0002-enable-sql-metadata-query.patch \
15 file://sqlalchemy-fix-ceilometer-resource-query.patch \
16" 14"
17 15
18SRCREV="ef71dc6a11ab624e756bfb61ec974e9f6096bc30" 16SRCREV="a4c7411ac903984c7e7524469f89a417cf9cf97e"
19PV="2013.2.2+git${SRCPV}" 17PV="2014.1.b2+git${SRCPV}"
20S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
21 19
22CEILOMETER_SECRET ?= "12121212" 20CEILOMETER_SECRET ?= "12121212"
23 21
22do_configure_append() {
23 # We are using postgresql support, hence this requirement is not valid
24 # removing it, to avoid on-target runtime issues
25 sed -e "s:MySQL-python::g" -i ${S}/requirements.txt
26}
27
24do_install_append() { 28do_install_append() {
25 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} 29 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
26 CEILOMETER_CONF_DIR=${D}${sysconfdir}/${SRCNAME} 30 CEILOMETER_CONF_DIR=${D}${sysconfdir}/${SRCNAME}
@@ -128,7 +132,9 @@ FILES_${SRCNAME}-controller = "${bindir}/* \
128" 132"
129 133
130RDEPENDS_${PN} += " \ 134RDEPENDS_${PN} += " \
131 python-sqlalchemy \ 135 python-ply \
136 python-jsonpath-rw \
137 python-sqlalchemy \
132 python-amqplib \ 138 python-amqplib \
133 python-anyjson \ 139 python-anyjson \
134 python-eventlet \ 140 python-eventlet \