Hello community,
here is the log from the commit of package openstack-ceilometer for
openSUSE:Factory checked in at 2014-01-20 07:04:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openstack-ceilometer (Old)
and /work/SRC/openSUSE:Factory/.openstack-ceilometer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openstack-ceilometer"
Changes:
--------
---
/work/SRC/openSUSE:Factory/openstack-ceilometer/openstack-ceilometer.changes
2013-12-10 16:03:19.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.openstack-ceilometer.new/openstack-ceilometer.changes
2014-01-23 15:50:27.000000000 +0100
@@ -1,0 +2,65 @@
+Sun Jan 12 01:26:02 UTC 2014 - [email protected]
+
+- Update to version 2013.2.2.dev5.gef71dc6:
+ + Remove redundant meter (name,type,unit) tuples from Resource model
+
+-------------------------------------------------------------------
+Fri Jan 10 12:34:37 UTC 2014 - [email protected]
+
+- Update to version 2013.2.2.dev4.ga3da4dc:
+ + 1st & last sample timestamps in Resource representation
+ + Avoid false negatives on message signature comparison
+
+-------------------------------------------------------------------
+Thu Jan 9 12:32:13 UTC 2014 - [email protected]
+
+- openstack-ceilometer.init: Fix DB sync on start
+
+-------------------------------------------------------------------
+Tue Dec 17 01:33:12 UTC 2013 - [email protected]
+
+- Update to version 2013.2.2.dev1.g4d15cc0:
+ + Bump stable/havana next version to 2013.2.2
+
+-------------------------------------------------------------------
+Mon Dec 16 09:30:59 UTC 2013 - [email protected]
+
+- fix requires
+
+-------------------------------------------------------------------
+Fri Dec 13 01:32:39 UTC 2013 - [email protected]
+
+- Update to version 2013.2.1.dev18.gfa5c8e2:
+ + Updated from global requirements
+
+-------------------------------------------------------------------
+Sun Dec 8 01:34:42 UTC 2013 - [email protected]
+
+- Update to version 2013.2.1.dev17.g5cbb965:
+ + Properly reconnect subscribing clients when QPID broker restarts
+ + Create a shared queue for QPID topic consumers
+
+-------------------------------------------------------------------
+Fri Dec 6 10:24:42 UTC 2013 - [email protected]
+
+- Update to version 2013.2.1.dev13.gc5b7462:
+ + make record_metering_data concurrency safe
+ + Avoid intermittent integrity error on alarm creation
+
+-------------------------------------------------------------------
+Mon Dec 2 09:50:53 UTC 2013 - [email protected]
+
+- Transform alarm-notifier into a daemon with seperate sub-package too
+
+-------------------------------------------------------------------
+Fri Nov 29 08:24:52 UTC 2013 - [email protected]
+
+- added the missing part for alarm-evaluator
+
+-------------------------------------------------------------------
+Fri Nov 29 01:29:59 UTC 2013 - [email protected]
+
+- Update to version 2013.2.1.dev9.g99b21df:
+ + Changes FakeMemcache to set token to expire on utcnow + 5 mins
+
+-------------------------------------------------------------------
@@ -13 +78 @@
-Sat Nov 23 01:39:15 UTC 2013 - [email protected]
+Sat Nov 23 01:39:15 UTC 2013 - [email protected]
@@ -17 +82,6 @@
- + mongodb, db2: do not print full URL in logs
+ + mongodb, db2: do not print full URL in logs (bnc#852177, CVE-2013-6384)
+
+-------------------------------------------------------------------
+Tue Nov 19 11:08:56 UTC 2013 - [email protected]
+
+- Set cache directory permissions to 700, a warning is shown otherwise
(bnc#854746)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openstack-ceilometer-doc.spec ++++++
--- /var/tmp/diff_new_pack.3z4Xss/_old 2014-01-23 15:50:28.000000000 +0100
+++ /var/tmp/diff_new_pack.3z4Xss/_new 2014-01-23 15:50:28.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package openstack-ceilometer-doc
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%define component ceilometer
Name: openstack-%{component}-doc
-Version: 2013.2.1.dev7.gd554fa8
+Version: 2013.2.2.dev5.gef71dc6
Release: 0
Summary: OpenStack Metering (Ceilometer) - Documentation
License: Apache-2.0
@@ -70,7 +70,7 @@
This package contains documentation files for openstack-ceilometer.
%prep
-%setup -q -n ceilometer-2013.2.1.dev7.gd554fa8
+%setup -q -n ceilometer-2013.2.2.dev5.gef71dc6
%openstack_cleanup_prep
sed -i "s|'sphinxcontrib.autohttp.flask',||" doc/source/conf.py
++++++ openstack-ceilometer.spec ++++++
--- /var/tmp/diff_new_pack.3z4Xss/_old 2014-01-23 15:50:28.000000000 +0100
+++ /var/tmp/diff_new_pack.3z4Xss/_new 2014-01-23 15:50:28.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package openstack-ceilometer
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 B1 Systems GmbH, Vohburg, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -22,7 +22,7 @@
%define username openstack-%{component}
Name: openstack-%{component}
-Version: 2013.2.1.dev7.gd554fa8
+Version: 2013.2.2.dev5.gef71dc6
Release: 0
Summary: OpenStack Metering (Ceilometer)
License: Apache-2.0
@@ -78,7 +78,7 @@
Summary: OpenStack Metering (Ceilometer) - Python module
Group: Development/Languages/Python
Requires: python >= 2.6.8
-Requires: python-Babel >= 0.9.6
+Requires: python-Babel >= 1.3
Requires: python-Flask >= 0.10
Requires: python-PyYAML >= 3.1.0
Requires: python-SQLAlchemy >= 0.7.8
@@ -91,7 +91,7 @@
Requires: python-eventlet >= 0.13.0
Requires: python-glanceclient >= 0.9.0
Requires: python-happybase >= 0.4
-Requires: python-iso8601 >= 0.1.4
+Requires: python-iso8601 >= 0.1.8
Requires: python-keystoneclient >= 0.3.2
Requires: python-kombu >= 2.4.8
Requires: python-lxml >= 2.3
@@ -102,7 +102,7 @@
Requires: python-pecan >= 0.2.0
Requires: python-pymongo >= 2.4
Requires: python-requests >= 1.1
-Requires: python-six
+Requires: python-six >= 1.4.1
Requires: python-sqlalchemy-migrate >= 0.7.2
Requires: python-stevedore >= 0.10
Requires: python-swiftclient >= 1.5
@@ -142,6 +142,22 @@
%description agent-compute
This package contains the %{name} agent compute.
+%package alarm-evaluator
+Summary: OpenStack Metering (Ceilometer) - Alarm Evaluator
+Group: Development/Languages/Python
+Requires: %{name} = %{version}
+
+%description alarm-evaluator
+This package contains the %{name} alarm evalutor.
+
+%package alarm-notifier
+Summary: OpenStack Metering (Ceilometer) - Alarm Evaluator
+Group: Development/Languages/Python
+Requires: %{name} = %{version}
+
+%description alarm-notifier
+This package contains the %{name} alarm evalutor.
+
%package test
Summary: OpenStack Metering (Ceilometer) - Testsuite
Group: Development/Languages/Python
@@ -162,7 +178,7 @@
Requires: python-pep8 >= 1.4.5
Requires: python-pyflakes >= 0.7.2
Requires: python-python-subunit
-Requires: python-sphinxcontrib-pecanwsme >= 0.3
+Requires: python-sphinxcontrib-pecanwsme >= 0.5
Requires: python-swift
Requires: python-testrepository >= 0.0.17
Requires: python-testscenarios >= 0.4
@@ -172,7 +188,7 @@
This package contains testsuite files for %{name}.
%prep
-%setup -q -n ceilometer-2013.2.1.dev7.gd554fa8
+%setup -q -n ceilometer-2013.2.2.dev5.gef71dc6
%patch0 -p1
%openstack_cleanup_prep
@@ -202,7 +218,7 @@
### init scripts
mkdir -p %{buildroot}%{_initddir}
mkdir -p %{buildroot}%{_sbindir}
-for i in api collector collector-udp agent-central agent-compute ; do
+for i in api collector collector-udp agent-central agent-compute
alarm-evaluator alarm-notifier ; do
tmp=$(mktemp)
cat %{SOURCE1} | sed "s/__NAME__/$i/g" > $tmp
install -m 755 $tmp %{buildroot}%{_initddir}/%{name}-$i
@@ -284,6 +300,26 @@
%restart_on_update openstack-ceilometer-agent-compute
%insserv_cleanup
+%post alarm-evaluator
+%{fillup_and_insserv -f openstack-ceilometer-alarm-evaluator}
+
+%preun alarm-evaluator
+%stop_on_removal openstack-ceilometer-alarm-evaluator
+
+%postun alarm-evaluator
+%restart_on_update openstack-ceilometer-alarm-evaluator
+%insserv_cleanup
+
+%post alarm-notifier
+%{fillup_and_insserv -f openstack-ceilometer-alarm-notifier}
+
+%preun alarm-notifier
+%stop_on_removal openstack-ceilometer-alarm-notifier
+
+%postun alarm-notifier
+%restart_on_update openstack-ceilometer-alarm-notifier
+%insserv_cleanup
+
%files
%defattr(-,root,root)
%doc README.rst
@@ -296,7 +332,7 @@
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %attr(0755, %{username}, %{username}) %{_localstatedir}/lib/%{component}
%dir %attr(0750, %{username}, %{username}) %{_localstatedir}/log/%{component}
-%dir %attr(0755, %{username}, %{username}) %{_localstatedir}/cache/ceilometer
+%dir %attr(0700, %{username}, %{username}) %{_localstatedir}/cache/ceilometer
%ghost %dir %attr(0755, %{username}, root) %{_localstatedir}/run/%{component}
%files -n python-ceilometer
@@ -320,8 +356,6 @@
%{_sbindir}/rc%{name}-collector-udp
%{_bindir}/%{component}-collector
%{_bindir}/%{component}-collector-udp
-%{_bindir}/%{component}-alarm-notifier
-%{_bindir}/%{component}-alarm-evaluator
%{_bindir}/%{component}-expirer
%files agent-central
@@ -342,6 +376,18 @@
%{_datadir}/polkit-1/rules.d/11-openstack-ceilometer.rules
%endif
+%files alarm-evaluator
+%defattr(-,root,root,-)
+%{_initddir}/%{name}-alarm-evaluator
+%{_sbindir}/rc%{name}-alarm-evaluator
+%{_bindir}/%{component}-alarm-evaluator
+
+%files alarm-notifier
+%defattr(-,root,root,-)
+%{_initddir}/%{name}-alarm-notifier
+%{_sbindir}/rc%{name}-alarm-notifier
+%{_bindir}/%{component}-alarm-notifier
+
%files test
%defattr(-,root,root)
%{python_sitelib}/%{component}/tests/
++++++ ceilometer-stable-havana.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ceilometer-2013.2.1.dev7.gd554fa8/AUTHORS
new/ceilometer-2013.2.2.dev5.gef71dc6/AUTHORS
--- old/ceilometer-2013.2.1.dev7.gd554fa8/AUTHORS 2013-11-25
13:59:32.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/AUTHORS 2014-01-11
15:17:37.000000000 +0100
@@ -1,3 +1,4 @@
+Alan Pevec <[email protected]>
Alessandro Pilotti <[email protected]>
Alexei Kornienko <[email protected]>
Andrew Hutchings <[email protected]>
@@ -18,6 +19,7 @@
Dan Florea <[email protected]>
Dan Prince <[email protected]>
Darren Birkett <[email protected]>
+David Peraza <[email protected]>
Dirk Mueller <[email protected]>
Doug Hellmann <[email protected]>
Endre Karlson <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ceilometer-2013.2.1.dev7.gd554fa8/ChangeLog
new/ceilometer-2013.2.2.dev5.gef71dc6/ChangeLog
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ChangeLog 2013-11-25
13:59:32.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ChangeLog 2014-01-11
15:17:37.000000000 +0100
@@ -1,3 +1,218 @@
+commit ef71dc6a11ab624e756bfb61ec974e9f6096bc30
+Author: Eoghan Glynn <[email protected]>
+Date: Thu Jan 9 11:11:43 2014 +0000
+
+ Remove redundant meter (name,type,unit) tuples from Resource model
+
+ Fixes bug 1267162
+
+ Previously, a list of meter (name,type,unit) tuples with per-sample
+ cardinality was added to the Resource model by the storage driver
+ get_resource method.
+
+ However this potentially huge and highly repetitive list was then
+ promptly discarded by the API layer, as the meter links in the API
+ Resource representation are populated via subsequent calls into
+ the storage driver get_meters method.
+
+ Now, we avoid the scaling issue by suppressing the creation of
+ this unused meter list.
+
+ Change-Id: I18dee7552836c724798ea1340e2e933c09d8a294
+ (cherry picked from commit 7c4c0e8fc098fbadec2e30ea2bdf1068b5b4288a)
+
+commit a3da4dcd10f3600ae8d271f31b36b366bdf5acc0
+Merge: 3089be8 171b37b
+Author: Jenkins <[email protected]>
+Date: Fri Jan 10 06:12:51 2014 +0000
+
+ Merge "Avoid false negatives on message signature comparison" into
stable/havana
+
+commit 3089be82318fef1a865bea411a1579b590d1e2b1
+Author: Eoghan Glynn <[email protected]>
+Date: Mon Jan 6 17:25:43 2014 +0000
+
+ 1st & last sample timestamps in Resource representation
+
+ Fixes bug 1262335
+
+ Previously, the first and last sample timestamps associated
+ with a resource were calculated by the storage driver, but
+ then discarded.
+
+ Now, we include these values in the API resource representation.
+
+ Change-Id: I3cf6081e1ac1294083f6326f85dabebab0d02203
+ (cherry picked from commit 6a9dc97f962c288f5037d59d05a771823eb4bcdd)
+
+commit 171b37b8b486d31ee2e2cc5db87b2c8b5b3be090
+Author: Eoghan Glynn <[email protected]>
+Date: Fri Jan 3 12:55:16 2014 +0000
+
+ Avoid false negatives on message signature comparison
+
+ Fixes bug 1262255
+
+ Previously, samples for the 'instance.scheduled' meter were always
+ rejected with a false negative on the message signature verification.
+
+ The problem occured because certain resource metadata (such as the
+ block_device_mapping) in the 'scheduler.run_instance.scheduled'
+ notification are realized as a list of dict, and are thus similarly
+ encoded in the corresponding sample payload.
+
+ However the message signature computation then became indeterminate,
+ as the unicode representation of equivalent dicts is not guaranteed
+ equal (e.g. depends on insertion order in the case of hash collisions).
+
+ Now, we avoid false negatives by explicitly re-ordering insertion
+ into such dicts.
+
+ Change-Id: I77f7d89229518cf040608d7eb3307e2257bce07a
+ (cherry picked from commit e9cde137b0c24ac755bbb3629b9a831391574f6c)
+
+commit 4d15cc05e9d2ada01b90e1d3c15427608cc49f54
+Author: Alan Pevec <[email protected]>
+Date: Mon Dec 16 02:55:59 2013 +0100
+
+ Bump stable/havana next version to 2013.2.2
+
+ Change-Id: I3a7170180717bd62fce4cbc2c3a9107187f89fb1
+
+commit fa5c8e22e50d34755244a63a23272dd58ec9c99e
+Author: OpenStack Jenkins <[email protected]>
+Date: Wed Dec 11 15:00:04 2013 +0000
+
+ Updated from global requirements
+
+ Change-Id: I3c2bf6087cf07cddb4b1290470d5180edbbec42f
+
+commit 5cbb96511cd0489aaa311d57a42cd962ec7d73b6
+Merge: 40b833c 4ce68fb
+Author: Jenkins <[email protected]>
+Date: Sun Dec 8 01:23:31 2013 +0000
+
+ Merge "Create a shared queue for QPID topic consumers" into stable/havana
+
+commit 40b833cc6e3bb211dfba368e30ae8927914d0930
+Merge: c5b7462 43a8921
+Author: Jenkins <[email protected]>
+Date: Sun Dec 8 01:23:29 2013 +0000
+
+ Merge "Properly reconnect subscribing clients when QPID broker restarts"
into stable/havana
+
+commit 4ce68fb8e30b3c4253939413dcd6b8b6a4443d2e
+Author: Eoghan Glynn <[email protected]>
+Date: Fri Dec 6 10:52:38 2013 +0000
+
+ Create a shared queue for QPID topic consumers
+
+ Fixes bug 1257293
+
+ This is a cherrypick of oslo-incubator:
+ e355fa3a9f49ff524ce98d1263a784b5a7929dfb
+
+ From the oslo-incubator commit:
+ When multiple RPC servers (consumers) are subscribed to the same RPC
+ topic, a single RPC request to that topic should be received by only
+ one of the consumers. A bug in the QPID driver caused every consumer
+ to receive a copy of the RPC request. This bug affects only Topology
+ version 2. This patch will cause a single queue to be created for
+ each topic, and shared among all consumers of that topic. This
+ results in each RPC request being received by only one consumer,
+ in turn across all the competing consumers.
+
+ Change-Id: I97c6eb5fe63322ab70716c63074818ff1b6ea82b
+
+commit 43a892138a506257992a116d2d33d3914c95e406
+Author: Eoghan Glynn <[email protected]>
+Date: Thu Dec 5 22:16:55 2013 +0000
+
+ Properly reconnect subscribing clients when QPID broker restarts
+
+ Fixes bug 1251757
+
+ This is a cherrypick of oslo-incubator:
+ 55678c7ab7fbc1b2beb428d046bb4162f23b0a53
+
+ From the oslo-incubator bug:
+ When the QPID broker is restarted (or fails over), subscribed clients
+ will attempt to re-establish their connections. In the case of fanout
+ subscriptions, this reconnection functionality is broken. For version
+ 1 topologies, the clients attempt to reconnect twice to the same
+ exclusive address - which is illegal. In the case of version 2
+ topologies, the address parsing is broken and an illegal address is
+ created on reconnect. This fix avoids the problem by removing the
+ special-case reconnect code that manages UUID addresses; it is
+ unnecessary as the QPID broker will generate unique queue names
+ automatically when the clients reconnect.
+
+ Change-Id: If966bb25e49b5837293a1bb181bbb02086599d81
+
+commit c5b746233d004bd120f59dbec2cdd70b91e6c809
+Merge: ae82878 59f25a4
+Author: Jenkins <[email protected]>
+Date: Fri Dec 6 09:53:24 2013 +0000
+
+ Merge "Avoid intermittent integrity error on alarm creation" into
stable/havana
+
+commit ae828783d2c59434bd2abb516e1d612e3fc73bbc
+Merge: 99b21df 4a60f53
+Author: Jenkins <[email protected]>
+Date: Fri Dec 6 09:46:04 2013 +0000
+
+ Merge "make record_metering_data concurrency safe" into stable/havana
+
+commit 99b21df1e5f049c37033f9861ba344c140c7ccf1
+Merge: d554fa8 becae18
+Author: Jenkins <[email protected]>
+Date: Thu Nov 28 16:35:32 2013 +0000
+
+ Merge "Changes FakeMemcache to set token to expire on utcnow + 5 mins"
into stable/havana
+
+commit 59f25a4f062a6e9d3a75baf38400ea5fc41c0a68
+Author: Eoghan Glynn <[email protected]>
+Date: Tue Nov 26 16:35:36 2013 +0000
+
+ Avoid intermittent integrity error on alarm creation
+
+ Fixes bug 1255107
+
+ Previously, alarm created failed intermittently with the
+ sqlalchemy driver, due to the reliance on session merge to create
+ the project & user IDs if not already encountered. This approach
+ conflicted with the strict foreign key constraints that were
+ added to the alarms table as an after-thought.
+
+ Now, we avoid the potential problem by creating the project and
+ user IDs explicitly.
+
+ Unfortunately, this cannot be tested via the scenario tests,
+ as there we use sqlite (the problematic migration does not
+ apply the foreign key constraints for that engine).
+
+ Change-Id: Ieaed676a0a68725242fadbf658646b874d6851ce
+ (cherry picked from commit b2b500c83cf5a81269c84a16f9a30ab7fa4c8ee6)
+
+commit 4a60f53ece305509cbed838bd74364dcdc243248
+Author: Mehdi Abaakouk <[email protected]>
+Date: Wed Oct 23 13:33:53 2013 +0200
+
+ make record_metering_data concurrency safe
+
+ Recording metering might happen in parallel, and if two sqlalchemy
+ session try to create a source, a user, a project or a resource at the
+ same time, one of them fail with a IntegrityError.
+
+ This patch ensure the record_metering_data sqlalchemy session always
+ have the needed source, user, project and a resource by creating missing
+ obj in an other sqlalchemy session.
+
+ Fixes bug: #1237671
+
+ Change-Id: Ie8761ce1615c3142ad6ad2a400537f465f3bbf0a
+ (cherry picked from commit dd62f9ce0d8d5abac0fb34b0520515b6c4566c1f)
+
commit d554fa8fe46244f9dc771602626a5d3b328a1c75
Merge: ef6c659 9f0a54a
Author: Jenkins <[email protected]>
@@ -47,6 +262,23 @@
Change-Id: If5f28cf19211a69b4d2b6094ff05b6e82129d873
+commit becae1827530c0cb43cd57180f853b364ec1dcbd
+Author: David Peraza <[email protected]>
+Date: Wed Oct 16 13:14:10 2013 -0500
+
+ Changes FakeMemcache to set token to expire on utcnow + 5 mins
+
+ fixes bug 1240994
+
+ keystoneclient 0.4 will use utcnow to compare expiration date.
+ The FakMemcache class sets expiration to datetime.now which sets
+ date for local timezone. If this timezone happens to be behind
+ utc the test will fail with expiration error because we are
+ comparing utc + 5 mins with utc - 1 or more hours.
+
+ Change-Id: I551506a5aaf0aef77476b11786399a66225603bf
+ (cherry picked from commit ac2a503d4d9ada69b5d5c1fbd2acf7397d8b4ac9)
+
commit d90c8e1638e957f867ed507464c889782edc241e
Merge: b616562 39b0a19
Author: Jenkins <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ceilometer-2013.2.1.dev7.gd554fa8/PKG-INFO
new/ceilometer-2013.2.2.dev5.gef71dc6/PKG-INFO
--- old/ceilometer-2013.2.1.dev7.gd554fa8/PKG-INFO 2013-11-25
13:59:32.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/PKG-INFO 2014-01-11
15:17:37.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ceilometer
-Version: 2013.2.1.dev7.gd554fa8
+Version: 2013.2.2.dev5.gef71dc6
Summary: OpenStack Metering
Home-page: http://www.openstack.org/
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/api/controllers/v2.py
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/api/controllers/v2.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/api/controllers/v2.py
2013-11-25 13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/api/controllers/v2.py
2014-01-11 15:15:01.000000000 +0100
@@ -893,8 +893,11 @@
user_id = wtypes.text
"The ID of the user who created the resource or updated it last"
- timestamp = datetime.datetime
- "UTC date and time of the last update to any meter for the resource"
+ first_sample_timestamp = datetime.datetime
+ "UTC date & time of the first sample associated with the resource"
+
+ last_sample_timestamp = datetime.datetime
+ "UTC date & time of the last sample associated with the resource"
metadata = {wtypes.text: wtypes.text}
"Arbitrary metadata associated with the resource"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/openstack/common/rpc/impl_qpid.py
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/openstack/common/rpc/impl_qpid.py
---
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/openstack/common/rpc/impl_qpid.py
2013-11-25 13:56:59.000000000 +0100
+++
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/openstack/common/rpc/impl_qpid.py
2014-01-11 15:15:01.000000000 +0100
@@ -18,7 +18,6 @@
import functools
import itertools
import time
-import uuid
import eventlet
import greenlet
@@ -124,7 +123,6 @@
},
},
"link": {
- "name": link_name,
"durable": True,
"x-declare": {
"durable": False,
@@ -139,6 +137,7 @@
"link": {
"x-declare": {
"auto-delete": True,
+ "exclusive": False,
},
},
}
@@ -146,6 +145,8 @@
raise_invalid_topology_version()
addr_opts["link"]["x-declare"].update(link_opts)
+ if link_name:
+ addr_opts["link"]["name"] = link_name
self.address = "%s ; %s" % (node_name, jsonutils.dumps(addr_opts))
@@ -220,14 +221,16 @@
if conf.qpid_topology_version == 1:
node_name = "%s/%s" % (msg_id, msg_id)
node_opts = {"type": "direct"}
+ link_name = msg_id
elif conf.qpid_topology_version == 2:
node_name = "amq.direct/%s" % msg_id
node_opts = {}
+ link_name = None
else:
raise_invalid_topology_version()
super(DirectConsumer, self).__init__(conf, session, callback,
- node_name, node_opts, msg_id,
+ node_name, node_opts, link_name,
link_opts)
@@ -279,30 +282,16 @@
if conf.qpid_topology_version == 1:
node_name = "%s_fanout" % topic
node_opts = {"durable": False, "type": "fanout"}
- link_name = "%s_fanout_%s" % (topic, uuid.uuid4().hex)
elif conf.qpid_topology_version == 2:
node_name = "amq.topic/fanout/%s" % topic
node_opts = {}
- link_name = ""
else:
raise_invalid_topology_version()
super(FanoutConsumer, self).__init__(conf, session, callback,
- node_name, node_opts, link_name,
+ node_name, node_opts, None,
link_opts)
- def reconnect(self, session):
- topic = self.get_node_name().rpartition('_fanout')[0]
- params = {
- 'session': session,
- 'topic': topic,
- 'callback': self.callback,
- }
-
- self.__init__(conf=self.conf, **params)
-
- super(FanoutConsumer, self).reconnect(session)
-
class Publisher(object):
"""Base Publisher class."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/impl_db2.py
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/impl_db2.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/impl_db2.py
2013-11-25 13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/impl_db2.py
2014-01-11 15:15:01.000000000 +0100
@@ -434,17 +434,10 @@
resource = lambda x: x['resource_id']
meters = self.db.meter.find(q, sort=sort_instructions)
for resource_id, r_meters in itertools.groupby(meters, key=resource):
- resource_meters = []
# Because we have to know first/last timestamp, and we need a full
# list of references to the resource's meters, we need a tuple
# here.
r_meters = tuple(r_meters)
- for meter in r_meters:
- resource_meters.append(models.ResourceMeter(
- counter_name=meter['counter_name'],
- counter_type=meter['counter_type'],
- counter_unit=meter.get('counter_unit', ''))
- )
latest_meter = r_meters[0]
last_ts = latest_meter['timestamp']
first_ts = r_meters[-1]['timestamp']
@@ -455,8 +448,7 @@
last_sample_timestamp=last_ts,
source=latest_meter['source'],
user_id=latest_meter['user_id'],
- metadata=latest_meter['resource_metadata'],
- meter=resource_meters)
+ metadata=latest_meter['resource_metadata'])
def get_meters(self, user=None, project=None, resource=None, source=None,
metaquery={}, pagination=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/impl_hbase.py
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/impl_hbase.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/impl_hbase.py
2013-11-25 13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/impl_hbase.py
2014-01-11 15:15:01.000000000 +0100
@@ -307,7 +307,7 @@
if pagination:
raise NotImplementedError(_('Pagination not implemented'))
- def make_resource(data, first_ts, last_ts, meter_refs):
+ def make_resource(data, first_ts, last_ts):
"""Transform HBase fields to Resource model."""
# convert HBase metadata e.g. f:r_display_name to display_name
data['f:metadata'] = _metadata_from_document(data)
@@ -320,10 +320,6 @@
source=data['f:source'],
user_id=data['f:user_id'],
metadata=data['f:metadata'],
- meter=[
- models.ResourceMeter(*(m.split("!")))
- for m in meter_refs
- ],
)
meter_table = self.conn.table(self.METER_TABLE)
@@ -350,11 +346,6 @@
meters, key=_resource_id_from_record_tuple):
meter_rows = [data[1] for data in sorted(
r_meters, key=_timestamp_from_record_tuple)]
- meter_references = [
- _format_meter_reference(m['f:counter_name'],
- m['f:counter_type'],
- m['f:counter_unit'])
- for m in meter_rows]
latest_data = meter_rows[-1]
min_ts = timeutils.parse_strtime(meter_rows[0]['f:timestamp'])
@@ -365,15 +356,13 @@
yield make_resource(
latest_data,
min_ts,
- max_ts,
- meter_references
+ max_ts
)
else:
yield make_resource(
latest_data,
min_ts,
- max_ts,
- meter_references
+ max_ts
)
def get_meters(self, user=None, project=None, resource=None, source=None,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/impl_mongodb.py
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/impl_mongodb.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/impl_mongodb.py
2013-11-25 13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/impl_mongodb.py
2014-01-11 15:15:01.000000000 +0100
@@ -661,16 +661,6 @@
last_sample_timestamp=result['last_sample_timestamp'],
source=result['source'],
metadata=result['metadata'],
- meter=[
- models.ResourceMeter(
- counter_name=m_n,
- counter_type=m_t,
- counter_unit=m_u,
- )
- for m_n, m_u, m_t in zip(result['meters_name'],
- result['meters_unit'],
- result['meters_type'])
- ],
)
def get_meters(self, user=None, project=None, resource=None, source=None,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/impl_sqlalchemy.py
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/impl_sqlalchemy.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/impl_sqlalchemy.py
2013-11-25 13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/impl_sqlalchemy.py
2014-01-11 15:15:01.000000000 +0100
@@ -159,7 +159,42 @@
engine.execute(table.delete())
@staticmethod
- def record_metering_data(data):
+ def _create_or_update(session, model_class, _id, source=None, **kwargs):
+ if not _id:
+ return None
+
+ try:
+ # create a nested session for the case of two call of
+ # record_metering_data run in parallel to not fail the
+ # record of this sample
+ # (except for sqlite, that doesn't support nested
+ # transaction and doesn't have concurrency problem)
+ nested = session.connection().dialect.name != 'sqlite'
+
+ # raise dbexc.DBDuplicateEntry manually for sqlite
+ # to not break the current session
+ if not nested and session.query(model_class).get(str(_id)):
+ raise dbexc.DBDuplicateEntry()
+
+ with session.begin(nested=nested,
+ subtransactions=not nested):
+ obj = model_class(id=str(_id))
+ session.add(obj)
+ except dbexc.DBDuplicateEntry:
+ # requery the object from the db if this is an other
+ # parallel/previous call of record_metering_data that
+ # have successfully created this object
+ obj = session.query(model_class).get(str(_id))
+
+ # update the object
+ if source and not filter(lambda x: x.id == source.id, obj.sources):
+ obj.sources.append(source)
+ for k in kwargs:
+ setattr(obj, k, kwargs[k])
+ return obj
+
+ @classmethod
+ def record_metering_data(cls, data):
"""Write the data to the backend storage system.
:param data: a dictionary such as returned by
@@ -167,39 +202,17 @@
"""
session = sqlalchemy_session.get_session()
with session.begin():
- if data['source']:
- source = session.query(Source).get(data['source'])
- if not source:
- source = Source(id=data['source'])
- session.add(source)
- else:
- source = None
-
- # create/update user && project, add/update their sources list
- if data['user_id']:
- user = session.merge(User(id=str(data['user_id'])))
- if not filter(lambda x: x.id == source.id, user.sources):
- user.sources.append(source)
- else:
- user = None
-
- if data['project_id']:
- project = session.merge(Project(id=str(data['project_id'])))
- if not filter(lambda x: x.id == source.id, project.sources):
- project.sources.append(source)
- else:
- project = None
-
# Record the updated resource metadata
rmetadata = data['resource_metadata']
-
- resource = session.merge(Resource(id=str(data['resource_id'])))
- if not filter(lambda x: x.id == source.id, resource.sources):
- resource.sources.append(source)
- resource.project = project
- resource.user = user
- # Current metadata being used and when it was last updated.
- resource.resource_metadata = rmetadata
+ source = cls._create_or_update(session, Source, data['source'])
+ user = cls._create_or_update(session, User, data['user_id'],
+ source)
+ project = cls._create_or_update(session, Project,
+ data['project_id'], source)
+ resource = cls._create_or_update(session, Resource,
+ data['resource_id'], source,
+ user=user, project=project,
+ resource_metadata=rmetadata)
# Record the raw data for the meter.
meter = Meter(counter_type=data['counter_type'],
@@ -215,7 +228,6 @@
meter.counter_volume = data['counter_volume']
meter.message_signature = data['message_signature']
meter.message_id = data['message_id']
- session.flush()
@staticmethod
def clear_expired_metering_data(ttl):
@@ -368,14 +380,6 @@
source=meter.sources[0].id,
user_id=meter.user_id,
metadata=meter.resource_metadata,
- meter=[
- api_models.ResourceMeter(
- counter_name=m.counter_name,
- counter_type=m.counter_type,
- counter_unit=m.counter_unit,
- )
- for m in meter.resource.meters
- ],
)
@staticmethod
@@ -631,8 +635,8 @@
"""
session = sqlalchemy_session.get_session()
with session.begin():
- session.merge(User(id=alarm.user_id))
- session.merge(Project(id=alarm.project_id))
+ Connection._create_or_update(session, User, alarm.user_id)
+ Connection._create_or_update(session, Project, alarm.project_id)
alarm_row = Alarm(id=alarm.alarm_id)
alarm_row.update(alarm.as_dict())
session.add(alarm_row)
@@ -733,9 +737,12 @@
"""
session = sqlalchemy_session.get_session()
with session.begin():
- session.merge(User(id=alarm_change['user_id']))
- session.merge(Project(id=alarm_change['project_id']))
- session.merge(Project(id=alarm_change['on_behalf_of']))
+ Connection._create_or_update(session, User,
+ alarm_change['user_id'])
+ Connection._create_or_update(session, Project,
+ alarm_change['project_id'])
+ Connection._create_or_update(session, Project,
+ alarm_change['on_behalf_of'])
alarm_change_row = AlarmChange(event_id=alarm_change['event_id'])
alarm_change_row.update(alarm_change)
session.add(alarm_change_row)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/models.py
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/models.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/storage/models.py
2013-11-25 13:56:59.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/storage/models.py
2014-01-11 15:15:01.000000000 +0100
@@ -102,8 +102,7 @@
def __init__(self, resource_id, project_id,
first_sample_timestamp,
last_sample_timestamp,
- source, user_id, metadata,
- meter):
+ source, user_id, metadata):
"""Create a new resource.
:param resource_id: UUID of the resource
@@ -113,7 +112,6 @@
:param source: the identifier for the user/project id definition
:param user_id: UUID of user owning the resource
:param metadata: most current metadata for the resource (a dict)
- :param meter: list of the meters reporting data for the resource,
"""
Model.__init__(self,
resource_id=resource_id,
@@ -123,28 +121,6 @@
source=source,
user_id=user_id,
metadata=metadata,
- meter=meter,
- )
-
-
-class ResourceMeter(Model):
- """The definitions of the meters for which data has been collected
- for a resource.
-
- See Resource.meter field.
- """
-
- def __init__(self, counter_name, counter_type, counter_unit):
- """Create a new resource meter.
-
- :param counter_name: the name of the counter updating the resource
- :param counter_type: one of gauge, delta, cumulative
- :param counter_unit: official units name for the sample data
- """
- Model.__init__(self,
- counter_name=counter_name,
- counter_type=counter_type,
- counter_unit=counter_unit,
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/utils.py
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/utils.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer/utils.py 2013-11-25
13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer/utils.py 2014-01-11
15:15:01.000000000 +0100
@@ -38,8 +38,17 @@
# When doing a pair of JSON encode/decode operations to the tuple,
# the tuple would become list. So we have to generate the value as
# list here.
- yield name, list(map(lambda x: unicode(x).encode('utf-8'),
- value))
+
+ # in the special case of the list item itself being a dict,
+ # create an equivalent dict with a predictable insertion order
+ # to avoid inconsistencies in the message signature computation
+ # for equivalent payloads modulo ordering
+ first = lambda i: i[0]
+ m = map(lambda x: unicode(dict(sorted(x.items(), key=first))
+ if isinstance(x, dict)
+ else x).encode('utf-8'),
+ value)
+ yield name, list(m)
else:
yield name, value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer.egg-info/PKG-INFO
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer.egg-info/PKG-INFO
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer.egg-info/PKG-INFO
2013-11-25 13:59:32.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer.egg-info/PKG-INFO
2014-01-11 15:17:37.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ceilometer
-Version: 2013.2.1.dev7.gd554fa8
+Version: 2013.2.2.dev5.gef71dc6
Summary: OpenStack Metering
Home-page: http://www.openstack.org/
Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer.egg-info/requires.txt
new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer.egg-info/requires.txt
--- old/ceilometer-2013.2.1.dev7.gd554fa8/ceilometer.egg-info/requires.txt
2013-11-25 13:59:32.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/ceilometer.egg-info/requires.txt
2014-01-11 15:17:37.000000000 +0100
@@ -1,7 +1,7 @@
pbr>=0.5.21,<1.0
WebOb>=1.2.3,<1.3
kombu>=2.4.8
-iso8601>=0.1.4
+iso8601>=0.1.8
SQLAlchemy>=0.7.8,<=0.7.99
sqlalchemy-migrate>=0.7.2
alembic>=0.4.1
@@ -20,7 +20,7 @@
python-swiftclient>=1.5
lxml>=2.3
requests>=1.1
-six
+six>=1.4.1
WSME>=0.5b5,<0.5b6
PyYAML>=3.1.0
oslo.config>=1.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ceilometer-2013.2.1.dev7.gd554fa8/requirements.txt
new/ceilometer-2013.2.2.dev5.gef71dc6/requirements.txt
--- old/ceilometer-2013.2.1.dev7.gd554fa8/requirements.txt 2013-11-25
13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/requirements.txt 2014-01-11
15:15:01.000000000 +0100
@@ -1,7 +1,7 @@
pbr>=0.5.21,<1.0
WebOb>=1.2.3,<1.3
kombu>=2.4.8
-iso8601>=0.1.4
+iso8601>=0.1.8
argparse
SQLAlchemy>=0.7.8,<=0.7.99
sqlalchemy-migrate>=0.7.2
@@ -21,7 +21,7 @@
python-swiftclient>=1.5
lxml>=2.3
requests>=1.1
-six
+six>=1.4.1
WSME>=0.5b5,<0.5b6
PyYAML>=3.1.0
oslo.config>=1.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ceilometer-2013.2.1.dev7.gd554fa8/setup.cfg
new/ceilometer-2013.2.2.dev5.gef71dc6/setup.cfg
--- old/ceilometer-2013.2.1.dev7.gd554fa8/setup.cfg 2013-11-25
13:59:32.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/setup.cfg 2014-01-11
15:17:37.000000000 +0100
@@ -1,6 +1,6 @@
[metadata]
name = ceilometer
-version = 2013.2.1
+version = 2013.2.2
summary = OpenStack Metering
description-file =
README.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/test-requirements.txt
new/ceilometer-2013.2.2.dev5.gef71dc6/test-requirements.txt
--- old/ceilometer-2013.2.1.dev7.gd554fa8/test-requirements.txt 2013-11-25
13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/test-requirements.txt 2014-01-11
15:15:01.000000000 +0100
@@ -8,12 +8,12 @@
mock>=1.0
mox>=0.5.3
fixtures>=0.3.14
-Babel>=0.9.6
+Babel>=1.3
http://tarballs.openstack.org/nova/nova-stable-havana.tar.gz#egg=nova
swift
# Docs Requirements
-sphinx>=1.1.2
-sphinxcontrib-pecanwsme>=0.3
+sphinx>=1.1.2,<1.2
+sphinxcontrib-pecanwsme>=0.5
docutils==0.9.1
oslo.sphinx
python-subunit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/tests/api/v2/test_acl_scenarios.py
new/ceilometer-2013.2.2.dev5.gef71dc6/tests/api/v2/test_acl_scenarios.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/tests/api/v2/test_acl_scenarios.py
2013-11-25 13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/tests/api/v2/test_acl_scenarios.py
2014-01-11 15:15:01.000000000 +0100
@@ -41,7 +41,7 @@
@staticmethod
def get(key):
if key == "tokens/%s" % VALID_TOKEN:
- dt = datetime.datetime.now() + datetime.timedelta(minutes=5)
+ dt = timeutils.utcnow() + datetime.timedelta(minutes=5)
return json.dumps(({'access': {
'token': {'id': VALID_TOKEN},
'user': {
@@ -54,7 +54,7 @@
]},
}}, timeutils.isotime(dt)))
if key == "tokens/%s" % VALID_TOKEN2:
- dt = datetime.datetime.now() + datetime.timedelta(minutes=5)
+ dt = timeutils.utcnow() + datetime.timedelta(minutes=5)
return json.dumps(({'access': {
'token': {'id': VALID_TOKEN2},
'user': {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/tests/api/v2/test_list_resources_scenarios.py
new/ceilometer-2013.2.2.dev5.gef71dc6/tests/api/v2/test_list_resources_scenarios.py
---
old/ceilometer-2013.2.1.dev7.gd554fa8/tests/api/v2/test_list_resources_scenarios.py
2013-11-25 13:57:00.000000000 +0100
+++
new/ceilometer-2013.2.2.dev5.gef71dc6/tests/api/v2/test_list_resources_scenarios.py
2014-01-11 15:15:01.000000000 +0100
@@ -25,6 +25,7 @@
from oslo.config import cfg
+from ceilometer.openstack.common import timeutils
from ceilometer.publisher import rpc
from ceilometer import sample
from ceilometer.tests import db as tests_db
@@ -45,7 +46,19 @@
data = self.get_json('/resources')
self.assertEqual([], data)
+ @staticmethod
+ def _isotime(timestamp):
+ # drop TZ specifier
+ return unicode(timeutils.isotime(timestamp))[:-1]
+
+ def _verify_sample_timestamps(self, res, first, last):
+ self.assertTrue('first_sample_timestamp' in res)
+ self.assertEqual(res['first_sample_timestamp'], self._isotime(first))
+ self.assertTrue('last_sample_timestamp' in res)
+ self.assertEqual(res['last_sample_timestamp'], self._isotime(last))
+
def test_instance_no_metadata(self):
+ timestamp = datetime.datetime(2012, 7, 2, 10, 40)
sample1 = sample.Sample(
'instance',
'cumulative',
@@ -54,7 +67,7 @@
'user-id',
'project-id',
'resource-id',
- timestamp=datetime.datetime(2012, 7, 2, 10, 40),
+ timestamp=timestamp,
resource_metadata=None,
source='test',
)
@@ -66,8 +79,13 @@
data = self.get_json('/resources')
self.assertEqual(1, len(data))
+ self._verify_sample_timestamps(data[0], timestamp, timestamp)
def test_instances(self):
+ timestamps = {
+ 'resource-id': datetime.datetime(2012, 7, 2, 10, 40),
+ 'resource-id-alternate': datetime.datetime(2012, 7, 2, 10, 41),
+ }
sample1 = sample.Sample(
'instance',
'cumulative',
@@ -76,7 +94,7 @@
'user-id',
'project-id',
'resource-id',
- timestamp=datetime.datetime(2012, 7, 2, 10, 40),
+ timestamp=timestamps['resource-id'],
resource_metadata={'display_name': 'test-server',
'tag': 'self.sample',
},
@@ -96,7 +114,7 @@
'user-id',
'project-id',
'resource-id-alternate',
- timestamp=datetime.datetime(2012, 7, 2, 10, 41),
+ timestamp=timestamps['resource-id-alternate'],
resource_metadata={'display_name': 'test-server',
'tag': 'self.sample2',
},
@@ -110,6 +128,40 @@
data = self.get_json('/resources')
self.assertEqual(2, len(data))
+ for res in data:
+ timestamp = timestamps.get(res['resource_id'])
+ self._verify_sample_timestamps(res, timestamp, timestamp)
+
+ def test_instance_multiple_samples(self):
+ timestamps = [
+ datetime.datetime(2012, 7, 2, 10, 40),
+ datetime.datetime(2012, 7, 2, 10, 41),
+ datetime.datetime(2012, 7, 2, 10, 42),
+ ]
+ for timestamp in timestamps:
+ datapoint = sample.Sample(
+ 'instance',
+ 'cumulative',
+ '',
+ 1,
+ 'user-id',
+ 'project-id',
+ 'resource-id',
+ timestamp=timestamp,
+ resource_metadata={'display_name': 'test-server',
+ 'tag': 'self.sample',
+ },
+ source='test',
+ )
+ msg = rpc.meter_message_from_counter(
+ datapoint,
+ cfg.CONF.publisher_rpc.metering_secret,
+ )
+ self.conn.record_metering_data(msg)
+
+ data = self.get_json('/resources')
+ self.assertEqual(1, len(data))
+ self._verify_sample_timestamps(data[0], timestamps[0], timestamps[-1])
def test_instances_one(self):
sample1 = sample.Sample(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/tests/publisher/test_rpc_publisher.py
new/ceilometer-2013.2.2.dev5.gef71dc6/tests/publisher/test_rpc_publisher.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/tests/publisher/test_rpc_publisher.py
2013-11-25 13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/tests/publisher/test_rpc_publisher.py
2014-01-11 15:15:01.000000000 +0100
@@ -94,6 +94,20 @@
'not-so-secret')
self.assertTrue(rpc.verify_signature(data, 'not-so-secret'))
+ def test_verify_signature_nested_list_of_dict(self):
+ small = 1
+ big = 1 << 64
+ nested = {small: 99, big: 42}
+ data = {'a': 'A',
+ 'b': 'B',
+ 'nested': {'list': [nested]}}
+ data['message_signature'] = rpc.compute_signature(
+ data,
+ 'not-so-secret')
+ # the keys 1 and 1<<64 cause a hash collision on 64bit platforms
+ data['nested']['list'] = [{big: 42, small: 99}]
+ self.assertTrue(rpc.verify_signature(data, 'not-so-secret'))
+
def test_verify_signature_nested_json(self):
data = {'a': 'A',
'b': 'B',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/tests/storage/test_storage_scenarios.py
new/ceilometer-2013.2.2.dev5.gef71dc6/tests/storage/test_storage_scenarios.py
---
old/ceilometer-2013.2.1.dev7.gd554fa8/tests/storage/test_storage_scenarios.py
2013-11-25 13:57:00.000000000 +0100
+++
new/ceilometer-2013.2.2.dev5.gef71dc6/tests/storage/test_storage_scenarios.py
2014-01-11 15:15:01.000000000 +0100
@@ -174,8 +174,6 @@
self.assertIn(resource.source, msgs_sources)
self.assertEqual(resource.user_id, 'user-id')
self.assertEqual(resource.metadata['display_name'], 'test-server')
- self.assertIn(models.ResourceMeter('instance', 'cumulative', ''),
- resource.meter)
break
else:
assert False, 'Never found resource-id'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ceilometer-2013.2.1.dev7.gd554fa8/tests/test_utils.py
new/ceilometer-2013.2.2.dev5.gef71dc6/tests/test_utils.py
--- old/ceilometer-2013.2.1.dev7.gd554fa8/tests/test_utils.py 2013-11-25
13:57:00.000000000 +0100
+++ new/ceilometer-2013.2.2.dev5.gef71dc6/tests/test_utils.py 2014-01-11
15:15:01.000000000 +0100
@@ -68,5 +68,19 @@
('nested.a', 'A'),
('nested.b', 'B')])
+ def test_recursive_keypairs_with_list_of_dict(self):
+ small = 1
+ big = 1 << 64
+ expected = [('a', 'A'),
+ ('b', 'B'),
+ ('nested:list', ['{%d: 99, %dL: 42}' % (small, big)])]
+ # the keys 1 and 1<<64 cause a hash collision on 64bit platforms
+ for nested in [{small: 99, big: 42}, {big: 42, small: 99}]:
+ data = {'a': 'A',
+ 'b': 'B',
+ 'nested': {'list': [nested]}}
+ pairs = list(utils.recursive_keypairs(data))
+ self.assertEqual(pairs, expected)
+
def test_decimal_to_dt_with_none_parameter(self):
self.assertEqual(utils.decimal_to_dt(None), None)
++++++ openstack-ceilometer.init ++++++
--- /var/tmp/diff_new_pack.3z4Xss/_old 2014-01-23 15:50:28.000000000 +0100
+++ /var/tmp/diff_new_pack.3z4Xss/_new 2014-01-23 15:50:28.000000000 +0100
@@ -26,6 +26,12 @@
case "$1" in
start)
+ if [ "$DAEMON" == "api" ]; then
+ echo -n "Checking DB Migrations for ceilometer"
+ su $USER -s /bin/sh -c "ceilometer-dbsync --config-file=$CONFFILE"
> /dev/null
+ rc_status -v
+ fi
+
echo -n "Starting ceilometer-$DAEMON"
/sbin/startproc -s -u $USER -t ${STARTUP_TIMEOUT:-5} -q
/usr/bin/ceilometer-$DAEMON --config-file=$CONFFILE --logfile=$LOGFILE
rc_status -v
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]