Hello community,
here is the log from the commit of package python-osprofiler for
openSUSE:Factory checked in at 2019-12-04 13:47:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-osprofiler (Old)
and /work/SRC/openSUSE:Factory/.python-osprofiler.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-osprofiler"
Wed Dec 4 13:47:48 2019 rev:10 rq:736623 version:2.8.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-osprofiler/python-osprofiler.changes
2019-05-03 22:43:04.079322490 +0200
+++
/work/SRC/openSUSE:Factory/.python-osprofiler.new.4691/python-osprofiler.changes
2019-12-04 14:18:41.718361042 +0100
@@ -1,0 +2,22 @@
+Wed Oct 9 12:39:40 UTC 2019 - [email protected]
+
+- update to version 2.8.2
+ - Add a job to run full Tempest with enabled profiler
+ - Minimum versions of databases with JSON data type support
+ - Allow OSPROFILER_TRACE_SQLALCHEMY to be overridden
+ - Don't fail if sqlalchemy driver fails to initialize
+ - Fix elasticsearch version in python requirements
+ - Automatic configuration of SQLAlchemy driver in DevStack
+ - Rename OSProfiler-enabled Tempest job
+ - Add Python 3 Train unit tests
+ - Bring env OSPROFILER_CONNECTION_STRING into effect
+ - Optimize storage schema for Redis driver
+ - Replace git.openstack.org URLs with opendev.org URLs
+ - Dropping the py35 testing
+ - Support standalone placement in the devstack
+ - Update master for stable/stein
+ - Collect traces from Tempest job
+ - change function list_traces of mongodb module
+ - OpenDev Migration Patch
+
+-------------------------------------------------------------------
Old:
----
osprofiler-2.6.0.tar.gz
New:
----
osprofiler-2.8.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-osprofiler.spec ++++++
--- /var/tmp/diff_new_pack.TYaRTn/_old 2019-12-04 14:18:42.114361093 +0100
+++ /var/tmp/diff_new_pack.TYaRTn/_new 2019-12-04 14:18:42.114361093 +0100
@@ -17,15 +17,14 @@
Name: python-osprofiler
-Version: 2.6.0
+Version: 2.8.2
Release: 0
Summary: OpenStack Profiler Library
License: Apache-2.0
Group: Development/Languages/Python
URL: https://launchpad.net/osprofiler
-Source0:
https://files.pythonhosted.org/packages/source/o/osprofiler/osprofiler-2.6.0.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/o/osprofiler/osprofiler-2.8.2.tar.gz
BuildRequires: openstack-macros
-BuildRequires: python-devel
BuildRequires: python2-PrettyTable >= 0.7.2
BuildRequires: python2-WebOb >= 1.7.1
BuildRequires: python2-ddt
@@ -45,7 +44,6 @@
BuildRequires: python3-PrettyTable >= 0.7.2
BuildRequires: python3-WebOb >= 1.7.1
BuildRequires: python3-ddt
-BuildRequires: python3-devel
BuildRequires: python3-docutils
BuildRequires: python3-elasticsearch
BuildRequires: python3-mock
@@ -88,14 +86,14 @@
%package -n python-osprofiler-doc
Summary: Documentation for OSProfiler
Group: Development/Languages/Python
-BuildRequires: python-Sphinx
-BuildRequires: python-openstackdocstheme
+BuildRequires: python3-Sphinx
+BuildRequires: python3-openstackdocstheme
%description -n python-osprofiler-doc
Documentation for OSProfiler.
%prep
-%autosetup -p1 -n osprofiler-2.6.0
+%autosetup -p1 -n osprofiler-2.8.2
%py_req_cleanup
%build
@@ -106,7 +104,7 @@
%python_clone -a %{buildroot}%{_bindir}/osprofiler
# generate html docs
-%{__python2} setup.py build_sphinx
+PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
++++++ _service ++++++
--- /var/tmp/diff_new_pack.TYaRTn/_old 2019-12-04 14:18:42.142361096 +0100
+++ /var/tmp/diff_new_pack.TYaRTn/_new 2019-12-04 14:18:42.142361096 +0100
@@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="renderspec">
- <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/stein/openstack/osprofiler/osprofiler.spec.j2</param>
+ <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/train/openstack/osprofiler/osprofiler.spec.j2</param>
<param name="output-name">python-osprofiler.spec</param>
- <param
name="requirements">https://raw.githubusercontent.com/openstack/osprofiler/stable/stein/requirements.txt</param>
+ <param
name="requirements">https://raw.githubusercontent.com/openstack/osprofiler/stable/train/requirements.txt</param>
<param name="changelog-email">[email protected]</param>
<param name="changelog-provider">gh,openstack,osprofiler</param>
</service>
++++++ osprofiler-2.6.0.tar.gz -> osprofiler-2.8.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/.zuul.yaml
new/osprofiler-2.8.2/.zuul.yaml
--- old/osprofiler-2.6.0/.zuul.yaml 2019-02-18 22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/.zuul.yaml 2019-09-04 16:25:44.000000000 +0200
@@ -6,16 +6,53 @@
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- - openstack-python36-jobs
- - openstack-python37-jobs
+ - openstack-python3-train-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:
jobs:
- openstack-tox-functional
- - openstack-tox-functional-py35
+ - openstack-tox-functional-py36
+ - tempest-smoke-py3-osprofiler-redis
+ - tempest-smoke-py3-osprofiler-sqlalchemy
gate:
jobs:
- openstack-tox-functional
- - openstack-tox-functional-py35
+ - openstack-tox-functional-py36
+ - tempest-smoke-py3-osprofiler-redis
+ - tempest-smoke-py3-osprofiler-sqlalchemy
+
+- job:
+ name: tempest-smoke-py3-osprofiler-redis
+ parent: tempest-full-py3
+ voting: false
+ post-run: playbooks/osprofiler-post.yaml
+ description: |
+ Run full tempest on py3 with profiling enabled (redis driver)
+ required-projects:
+ - openstack/osprofiler
+ vars:
+ tox_envlist: smoke
+ devstack_localrc:
+ OSPROFILER_COLLECTOR: redis
+ OSPROFILER_HMAC_KEYS: SECRET_KEY
+ devstack_plugins:
+ osprofiler: https://opendev.org/openstack/osprofiler
+
+- job:
+ name: tempest-smoke-py3-osprofiler-sqlalchemy
+ parent: tempest-full-py3
+ voting: false
+ post-run: playbooks/osprofiler-post.yaml
+ description: |
+ Run full tempest on py3 with profiling enabled (sqlalchemy driver)
+ required-projects:
+ - openstack/osprofiler
+ vars:
+ tox_envlist: smoke
+ devstack_localrc:
+ OSPROFILER_COLLECTOR: sqlalchemy
+ OSPROFILER_HMAC_KEYS: SECRET_KEY
+ devstack_plugins:
+ osprofiler: https://opendev.org/openstack/osprofiler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/AUTHORS new/osprofiler-2.8.2/AUTHORS
--- old/osprofiler-2.6.0/AUTHORS 2019-02-18 22:53:41.000000000 +0100
+++ new/osprofiler-2.8.2/AUTHORS 2019-09-04 16:26:48.000000000 +0200
@@ -8,6 +8,7 @@
Andrey Kurilin <[email protected]>
Atsushi SAKAI <[email protected]>
BENJAMIN VANHAVERMAET <[email protected]>
+Balazs Gibizer <[email protected]>
Boris Pavlovic <[email protected]>
Carlos Goncalves <[email protected]>
ChangBo Guo(gcb) <[email protected]>
@@ -17,6 +18,7 @@
Doug Hellmann <[email protected]>
Einst Crazy <[email protected]>
Flavio Percoco <[email protected]>
+Ghanshyam Mann <[email protected]>
Harshada Mangesh Kakad <[email protected]>
Hongbin Lu <[email protected]>
Ilya Shakhat <[email protected]>
@@ -36,6 +38,7 @@
Omer Anson <[email protected]>
Ondřej Nový <[email protected]>
OpenStack Release Bot <[email protected]>
+Radoslaw Smigielski <[email protected]>
Roman Podoliaka <[email protected]>
Shoham Peller <[email protected]>
Simon Pasquier <[email protected]>
@@ -50,8 +53,11 @@
Vieri <[email protected]>
Vipin Balachandran <[email protected]>
Vu Cong Tuan <[email protected]>
+XiaojueGuan <[email protected]>
Zhi Yan Liu <[email protected]>
+caoyuan <[email protected]>
chenxu <[email protected]>
+francotseng <[email protected]>
gecong1973 <[email protected]>
howardlee <[email protected]>
kavithahr <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/ChangeLog
new/osprofiler-2.8.2/ChangeLog
--- old/osprofiler-2.6.0/ChangeLog 2019-02-18 22:53:41.000000000 +0100
+++ new/osprofiler-2.8.2/ChangeLog 2019-09-04 16:26:48.000000000 +0200
@@ -1,6 +1,37 @@
CHANGES
=======
+2.8.2
+-----
+
+* Add Python 3 Train unit tests
+
+2.8.1
+-----
+
+* Bring env OSPROFILER\_CONNECTION\_STRING into effect
+* Support standalone placement in the devstack
+
+2.8.0
+-----
+
+* Automatic configuration of SQLAlchemy driver in DevStack
+* change function list\_traces of mongodb module
+* Replace git.openstack.org URLs with opendev.org URLs
+* Fix elasticsearch version in python requirements
+
+2.7.0
+-----
+
+* Minimum versions of databases with JSON data type support
+* OpenDev Migration Patch
+* Dropping the py35 testing
+* Optimize storage schema for Redis driver
+* Allow OSPROFILER\_TRACE\_SQLALCHEMY to be overridden
+* Rename OSProfiler-enabled Tempest job
+* Don't fail if sqlalchemy driver fails to initialize
+* Update master for stable/stein
+
2.6.0
-----
@@ -33,6 +64,8 @@
-----
* build universal wheels
+* Collect traces from Tempest job
+* Add a job to run full Tempest with enabled profiler
* Make tracing of SQL statements configurable in DevStack plugin
2.4.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/PKG-INFO
new/osprofiler-2.8.2/PKG-INFO
--- old/osprofiler-2.6.0/PKG-INFO 2019-02-18 22:53:41.000000000 +0100
+++ new/osprofiler-2.8.2/PKG-INFO 2019-09-04 16:26:49.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: osprofiler
-Version: 2.6.0
+Version: 2.8.2
Summary: OpenStack Profiler Library
Home-page: https://docs.openstack.org/osprofiler/latest/
Author: OpenStack
@@ -36,7 +36,7 @@
* Free software: Apache license
* Documentation: https://docs.openstack.org/osprofiler/latest/
- * Source: https://git.openstack.org/cgit/openstack/osprofiler
+ * Source: https://opendev.org/openstack/osprofiler
* Bugs: https://bugs.launchpad.net/osprofiler
* Release notes: https://docs.openstack.org/releasenotes/osprofiler
@@ -50,6 +50,8 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.5
-Provides-Extra: oslo_config
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Provides-Extra: test
+Provides-Extra: oslo_config
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/README.rst
new/osprofiler-2.8.2/README.rst
--- old/osprofiler-2.6.0/README.rst 2019-02-18 22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/README.rst 2019-09-04 16:25:44.000000000 +0200
@@ -28,6 +28,6 @@
* Free software: Apache license
* Documentation: https://docs.openstack.org/osprofiler/latest/
-* Source: https://git.openstack.org/cgit/openstack/osprofiler
+* Source: https://opendev.org/openstack/osprofiler
* Bugs: https://bugs.launchpad.net/osprofiler
* Release notes: https://docs.openstack.org/releasenotes/osprofiler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/devstack/README.rst
new/osprofiler-2.8.2/devstack/README.rst
--- old/osprofiler-2.6.0/devstack/README.rst 2019-02-18 22:52:33.000000000
+0100
+++ new/osprofiler-2.8.2/devstack/README.rst 2019-09-04 16:25:44.000000000
+0200
@@ -17,6 +17,7 @@
* ``<empty>`` - default messaging driver is used
* ``redis`` - Redis is installed
* ``jaeger`` - Jaeger is installed
+ * ``sqlalchemy`` - SQLAlchemy driver is installed
The default value of ``OSPROFILER_CONNECTION_STRING`` is set automatically
depending on ``OSPROFILER_COLLECTOR`` value.
@@ -31,6 +32,7 @@
* ``mongodb://host:port`` - use MongoDB as trace storage
* ``loginsight://username:password@host`` - use LogInsight as trace
collector/storage
* ``jaeger://host:port`` - use Jaeger as trace collector
+ * ``mysql+pymysql://username:password@host/profiler?charset=utf8`` - use
SQLAlchemy driver with MySQL database
To configure DevStack and enable OSProfiler edit ``${DEVSTACK_DIR}/local.conf``
@@ -38,14 +40,14 @@
* to use Redis collector::
- enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler
master
+ enable_plugin osprofiler https://opendev.org/openstack/osprofiler master
OSPROFILER_COLLECTOR=redis
OSProfiler plugin will install Redis and configure OSProfiler to use Redis
driver
* to use specified driver::
- enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler
master
+ enable_plugin osprofiler https://opendev.org/openstack/osprofiler master
OSPROFILER_CONNECTION_STRING=<connection string value>
the driver is chosen depending on the value of
@@ -71,7 +73,7 @@
**OSPROFILER_CONNECTION_STRING** - connection string to identify the driver.
Default value is ``messaging://`` refers to messaging driver. For a full
list of drivers please refer to
-``https://git.openstack.org/cgit/openstack/osprofiler/tree/osprofiler/drivers``.
+``https://opendev.org/openstack/osprofiler/src/branch/master/osprofiler/drivers``.
Example: enable ElasticSearch driver with the server running on localhost::
OSPROFILER_CONNECTION_STRING=elasticsearch://127.0.0.1:9200
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/devstack/lib/osprofiler
new/osprofiler-2.8.2/devstack/lib/osprofiler
--- old/osprofiler-2.6.0/devstack/lib/osprofiler 2019-02-18
22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/devstack/lib/osprofiler 2019-09-04
16:25:44.000000000 +0200
@@ -26,6 +26,7 @@
$SENLIN_CONF
$MAGNUM_CONF
$ZUN_CONF
+ $PLACEMENT_CONF
)
# Add config files of Nova Cells
@@ -112,9 +113,15 @@
elif [ "$OSPROFILER_COLLECTOR" == "mongodb" ]; then
install_mongodb
OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"mongodb://localhost:27017"}
+ elif [ "$OSPROFILER_COLLECTOR" == "sqlalchemy" ]; then
+ local db=`database_connection_url osprofiler`
+ OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-${db}}
+ recreate_database osprofiler
else
die $LINENO "OSProfiler collector $OSPROFILER_COLLECTOR is not
supported"
fi
+
+ echo ${OSPROFILER_CONNECTION_STRING} > $HOME/.osprofiler_connection_string
}
function configure_osprofiler() {
@@ -133,6 +140,11 @@
reload_service devstack@keystone
}
+function configure_osprofiler_in_tempest() {
+
+ iniset $TEMPEST_CONFIG profiler key $OSPROFILER_HMAC_KEYS
+}
+
# Restore xtrace
$XTRACE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/devstack/plugin.sh
new/osprofiler-2.8.2/devstack/plugin.sh
--- old/osprofiler-2.6.0/devstack/plugin.sh 2019-02-18 22:52:33.000000000
+0100
+++ new/osprofiler-2.8.2/devstack/plugin.sh 2019-09-04 16:25:44.000000000
+0200
@@ -14,6 +14,11 @@
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring OSProfiler"
configure_osprofiler
+
+elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
+ echo_summary "Configuring Tempest"
+ configure_osprofiler_in_tempest
+
fi
# Restore xtrace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/devstack/settings
new/osprofiler-2.8.2/devstack/settings
--- old/osprofiler-2.6.0/devstack/settings 2019-02-18 22:52:33.000000000
+0100
+++ new/osprofiler-2.8.2/devstack/settings 2019-09-04 16:25:44.000000000
+0200
@@ -6,6 +6,6 @@
OSPROFILER_HMAC_KEYS=${OSPROFILER_HMAC_KEYS:-"SECRET_KEY"}
# Set whether tracing of SQL requests is enabled or not
-OSPROFILER_TRACE_SQLALCHEMY="True"
+OSPROFILER_TRACE_SQLALCHEMY=${OSPROFILER_TRACE_SQLALCHEMY:-"True"}
enable_service osprofiler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/doc/source/user/collectors.rst
new/osprofiler-2.8.2/doc/source/user/collectors.rst
--- old/osprofiler-2.6.0/doc/source/user/collectors.rst 2019-02-18
22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/doc/source/user/collectors.rst 2019-09-04
16:25:44.000000000 +0200
@@ -62,5 +62,12 @@
the database user (in this example called `username`) needs to have priviliges
to create tables and select and insert rows.
+.. note::
+
+ SQLAlchemy collector requires database JSON data type support.
+ This type of data is supported by versions listed below or higher:
+
+ - MariaDB 10.2
+ - MySQL 5.7.8
.. _SQLAlchemy understands:
https://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/osprofiler-2.6.0/doc/source/user/similar_projects.rst
new/osprofiler-2.8.2/doc/source/user/similar_projects.rst
--- old/osprofiler-2.6.0/doc/source/user/similar_projects.rst 2019-02-18
22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/doc/source/user/similar_projects.rst 2019-09-04
16:25:44.000000000 +0200
@@ -12,9 +12,9 @@
* `Jaeger`_
* `OpenTracing`_
-.. _Zipkin: http://zipkin.io/
+.. _Zipkin: https://zipkin.io/
.. _Dapper: http://research.google.com/pubs/pub36356.html
.. _Tomograph: https://github.com/stackforge/tomograph
.. _HTrace: https://htrace.incubator.apache.org/
.. _Jaeger: https://uber.github.io/jaeger/
-.. _OpenTracing: http://opentracing.io/
+.. _OpenTracing: https://opentracing.io/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/osprofiler/cmd/commands.py
new/osprofiler-2.8.2/osprofiler/cmd/commands.py
--- old/osprofiler-2.6.0/osprofiler/cmd/commands.py 2019-02-18
22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/osprofiler/cmd/commands.py 2019-09-04
16:25:44.000000000 +0200
@@ -36,7 +36,6 @@
@cliutils.arg("trace", help="File with trace or trace id")
@cliutils.arg("--connection-string", dest="conn_str",
default=(cliutils.env("OSPROFILER_CONNECTION_STRING")),
- required=True,
help="Storage driver's connection string. Defaults to "
"env[OSPROFILER_CONNECTION_STRING] if set")
@cliutils.arg("--transport-url", dest="transport_url",
@@ -59,6 +58,12 @@
def show(self, args):
"""Display trace results in HTML, JSON or DOT format."""
+ if not args.conn_str:
+ raise exc.CommandError(
+ "You must provide connection string via"
+ " either --connection-string or "
+ "via env[OSPROFILER_CONNECTION_STRING]")
+
trace = None
if not uuidutils.is_uuid_like(args.trace):
@@ -156,7 +161,6 @@
@cliutils.arg("--connection-string", dest="conn_str",
default=cliutils.env("OSPROFILER_CONNECTION_STRING"),
- required=True,
help="Storage driver's connection string. Defaults to "
"env[OSPROFILER_CONNECTION_STRING] if set")
@cliutils.arg("--error-trace", dest="error_trace",
@@ -164,6 +168,11 @@
help="List all traces that contain error.")
def list(self, args):
"""List all traces"""
+ if not args.conn_str:
+ raise exc.CommandError(
+ "You must provide connection string via"
+ " either --connection-string or "
+ "via env[OSPROFILER_CONNECTION_STRING]")
try:
engine = base.get_driver(args.conn_str, **args.__dict__)
except Exception as e:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/osprofiler/drivers/mongodb.py
new/osprofiler-2.8.2/osprofiler/drivers/mongodb.py
--- old/osprofiler-2.6.0/osprofiler/drivers/mongodb.py 2019-02-18
22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/osprofiler/drivers/mongodb.py 2019-09-04
16:25:44.000000000 +0200
@@ -81,7 +81,7 @@
at least `base_id` and `timestamp`.
"""
fields = set(fields or self.default_trace_fields)
- ids = self.db.profiler.find("*").distinct("base_id")
+ ids = self.db.profiler.find({}).distinct("base_id")
out_format = {"base_id": 1, "timestamp": 1, "_id": 0}
out_format.update({i: 1 for i in fields})
return [self.db.profiler.find(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/osprofiler/drivers/redis_driver.py
new/osprofiler-2.8.2/osprofiler/drivers/redis_driver.py
--- old/osprofiler-2.6.0/osprofiler/drivers/redis_driver.py 2019-02-18
22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/osprofiler/drivers/redis_driver.py 2019-09-04
16:25:44.000000000 +0200
@@ -47,7 +47,8 @@
# only connection over network is supported with schema
# redis://[:password]@host[:port][/db]
self.db = StrictRedis.from_url(self.connection_str)
- self.namespace = "osprofiler:"
+ self.namespace_opt = "osprofiler_opt:"
+ self.namespace = "osprofiler:" # legacy
self.namespace_error = "osprofiler_error:"
@classmethod
@@ -73,9 +74,8 @@
data = info.copy()
data["project"] = self.project
data["service"] = self.service
- key = self.namespace + data["base_id"] + "_" + data["trace_id"] + "_"
+ \
- data["timestamp"]
- self.db.set(key, jsonutils.dumps(data))
+ key = self.namespace_opt + data["base_id"]
+ self.db.lpush(key, jsonutils.dumps(data))
if (self.filter_error_trace
and data.get("info", {}).get("etype") is not None):
@@ -100,6 +100,19 @@
"""
fields = set(fields or self.default_trace_fields)
+ # first get legacy events
+ result = self._list_traces_legacy(fields)
+
+ # with optimized schema trace events are stored in a list
+ ids = self.db.scan_iter(match=self.namespace_opt + "*")
+ for i in ids:
+ # for each trace query the first event to have a timestamp
+ first_event = jsonutils.loads(self.db.lindex(i, 1))
+ result.append({key: value for key, value in first_event.items()
+ if key in fields})
+ return result
+
+ def _list_traces_legacy(self, fields):
# With current schema every event is stored under its own unique key
# To query all traces we first need to get all keys, then
# get all events, sort them and pick up only the first one
@@ -134,8 +147,15 @@
:param base_id: Base id of trace elements.
"""
- for key in self.db.scan_iter(match=self.namespace + base_id + "*"):
- data = self.db.get(key)
+ def iterate_events():
+ for key in self.db.scan_iter(
+ match=self.namespace + base_id + "*"): # legacy
+ yield self.db.get(key)
+
+ for event in self.db.lrange(self.namespace_opt + base_id, 0, -1):
+ yield event
+
+ for data in iterate_events():
n = jsonutils.loads(data)
trace_id = n["trace_id"]
parent_id = n["parent_id"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/osprofiler-2.6.0/osprofiler/drivers/sqlalchemy_driver.py
new/osprofiler-2.8.2/osprofiler/drivers/sqlalchemy_driver.py
--- old/osprofiler-2.6.0/osprofiler/drivers/sqlalchemy_driver.py
2019-02-18 22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/osprofiler/drivers/sqlalchemy_driver.py
2019-09-04 16:25:44.000000000 +0200
@@ -34,34 +34,40 @@
from sqlalchemy import Table, MetaData, Column
from sqlalchemy import String, JSON, Integer
except ImportError:
- raise exc.CommandError(
- "To use this command, you should install 'SQLAlchemy'")
+ LOG.exception("To use this command, install 'SQLAlchemy'")
+ else:
+ self._metadata = MetaData()
+ self._data_table = Table(
+ "data", self._metadata,
+ Column("id", Integer, primary_key=True),
+ # timestamp - date/time of the trace point
+ Column("timestamp", String(26), index=True),
+ # base_id - uuid common for all notifications related to
+ # one trace
+ Column("base_id", String(255), index=True),
+ # parent_id - uuid of parent element in trace
+ Column("parent_id", String(255), index=True),
+ # trace_id - uuid of current element in trace
+ Column("trace_id", String(255), index=True),
+ Column("project", String(255), index=True),
+ Column("host", String(255), index=True),
+ Column("service", String(255), index=True),
+ # name - trace point name
+ Column("name", String(255), index=True),
+ Column("data", JSON)
+ )
- self._engine = create_engine(connection_str)
- self._conn = self._engine.connect()
- self._metadata = MetaData()
- self._data_table = Table(
- "data", self._metadata,
- Column("id", Integer, primary_key=True),
- # timestamp - date/time of the trace point
- Column("timestamp", String(26), index=True),
- # base_id - uuid common for all notifications related to one trace
- Column("base_id", String(255), index=True),
- # parent_id - uuid of parent element in trace
- Column("parent_id", String(255), index=True),
- # trace_id - uuid of current element in trace
- Column("trace_id", String(255), index=True),
- Column("project", String(255), index=True),
- Column("host", String(255), index=True),
- Column("service", String(255), index=True),
- # name - trace point name
- Column("name", String(255), index=True),
- Column("data", JSON)
- )
-
- # FIXME(toabctl): Not the best idea to create the table on every
- # startup when using the sqlalchemy driver...
- self._metadata.create_all(self._engine, checkfirst=True)
+ # we don't want to kill any service that does use osprofiler
+ try:
+ self._engine = create_engine(connection_str)
+ self._conn = self._engine.connect()
+
+ # FIXME(toabctl): Not the best idea to create the table on every
+ # startup when using the sqlalchemy driver...
+ self._metadata.create_all(self._engine, checkfirst=True)
+ except Exception:
+ LOG.exception("Failed to create engine/connection and setup "
+ "intial database tables")
@classmethod
def get_name(cls):
@@ -79,23 +85,40 @@
service = data.pop("service", self.service)
name = data.pop("name", None)
- ins = self._data_table.insert().values(
- timestamp=timestamp,
- base_id=base_id,
- parent_id=parent_id,
- trace_id=trace_id,
- project=project,
- service=service,
- host=host,
- name=name,
- data=jsonutils.dumps(data)
- )
try:
+ ins = self._data_table.insert().values(
+ timestamp=timestamp,
+ base_id=base_id,
+ parent_id=parent_id,
+ trace_id=trace_id,
+ project=project,
+ service=service,
+ host=host,
+ name=name,
+ data=jsonutils.dumps(data)
+ )
self._conn.execute(ins)
except Exception:
LOG.exception("Can not store osprofiler tracepoint {} "
"(base_id {})".format(trace_id, base_id))
+ def list_traces(self, fields=None):
+ try:
+ from sqlalchemy.sql import select
+ except ImportError:
+ raise exc.CommandError(
+ "To use this command, you should install 'SQLAlchemy'")
+ stmt = select([self._data_table])
+ seen_ids = set()
+ result = []
+ traces = self._conn.execute(stmt).fetchall()
+ for trace in traces:
+ if trace["base_id"] not in seen_ids:
+ seen_ids.add(trace["base_id"])
+ result.append({key: value for key, value in trace.items()
+ if key in fields})
+ return result
+
def get_report(self, base_id):
try:
from sqlalchemy.sql import select
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/osprofiler.egg-info/PKG-INFO
new/osprofiler-2.8.2/osprofiler.egg-info/PKG-INFO
--- old/osprofiler-2.6.0/osprofiler.egg-info/PKG-INFO 2019-02-18
22:53:41.000000000 +0100
+++ new/osprofiler-2.8.2/osprofiler.egg-info/PKG-INFO 2019-09-04
16:26:49.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: osprofiler
-Version: 2.6.0
+Version: 2.8.2
Summary: OpenStack Profiler Library
Home-page: https://docs.openstack.org/osprofiler/latest/
Author: OpenStack
@@ -36,7 +36,7 @@
* Free software: Apache license
* Documentation: https://docs.openstack.org/osprofiler/latest/
- * Source: https://git.openstack.org/cgit/openstack/osprofiler
+ * Source: https://opendev.org/openstack/osprofiler
* Bugs: https://bugs.launchpad.net/osprofiler
* Release notes: https://docs.openstack.org/releasenotes/osprofiler
@@ -50,6 +50,8 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.5
-Provides-Extra: oslo_config
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Provides-Extra: test
+Provides-Extra: oslo_config
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/osprofiler.egg-info/SOURCES.txt
new/osprofiler-2.8.2/osprofiler.egg-info/SOURCES.txt
--- old/osprofiler-2.6.0/osprofiler.egg-info/SOURCES.txt 2019-02-18
22:53:41.000000000 +0100
+++ new/osprofiler-2.8.2/osprofiler.egg-info/SOURCES.txt 2019-09-04
16:26:49.000000000 +0200
@@ -92,13 +92,16 @@
osprofiler/tests/unit/drivers/test_messaging.py
osprofiler/tests/unit/drivers/test_mongodb.py
osprofiler/tests/unit/drivers/test_redis_driver.py
+playbooks/osprofiler-post.yaml
releasenotes/notes/add-reno-996dd44974d53238.yaml
+releasenotes/notes/redis-improvement-d4c91683fc89f570.yaml
releasenotes/source/conf.py
releasenotes/source/index.rst
releasenotes/source/ocata.rst
releasenotes/source/pike.rst
releasenotes/source/queens.rst
releasenotes/source/rocky.rst
+releasenotes/source/stein.rst
releasenotes/source/unreleased.rst
releasenotes/source/_static/.placeholder
releasenotes/source/_templates/.placeholder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/osprofiler.egg-info/pbr.json
new/osprofiler-2.8.2/osprofiler.egg-info/pbr.json
--- old/osprofiler-2.6.0/osprofiler.egg-info/pbr.json 2019-02-18
22:53:41.000000000 +0100
+++ new/osprofiler-2.8.2/osprofiler.egg-info/pbr.json 2019-09-04
16:26:49.000000000 +0200
@@ -1 +1 @@
-{"git_version": "da7a859", "is_release": true}
\ No newline at end of file
+{"git_version": "d431c7a", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/osprofiler.egg-info/requires.txt
new/osprofiler-2.8.2/osprofiler.egg-info/requires.txt
--- old/osprofiler-2.6.0/osprofiler.egg-info/requires.txt 2019-02-18
22:53:41.000000000 +0100
+++ new/osprofiler-2.8.2/osprofiler.egg-info/requires.txt 2019-09-04
16:26:49.000000000 +0200
@@ -21,7 +21,7 @@
sphinx>=1.6.2
bandit>=1.1.0
pymongo!=3.1,>=3.0.2
-elasticsearch<=3.0.0,>=2.0.0
+elasticsearch<3.0.0,>=2.0.0
redis>=2.10.0
reno>=2.5.0
jaeger-client>=3.8.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/playbooks/osprofiler-post.yaml
new/osprofiler-2.8.2/playbooks/osprofiler-post.yaml
--- old/osprofiler-2.6.0/playbooks/osprofiler-post.yaml 1970-01-01
01:00:00.000000000 +0100
+++ new/osprofiler-2.8.2/playbooks/osprofiler-post.yaml 2019-09-04
16:25:44.000000000 +0200
@@ -0,0 +1,58 @@
+- hosts: controller
+ vars:
+ osprofiler_traces_dir: '/opt/stack/osprofiler-traces'
+ tasks:
+ - name: Create directory for traces
+ become: True
+ become_user: stack
+ file:
+ path: '{{ osprofiler_traces_dir }}'
+ state: directory
+ owner: stack
+ group: stack
+
+ - name: Read connection string from a file
+ command: "cat /opt/stack/.osprofiler_connection_string"
+ register: osprofiler_connection_string
+
+ - debug:
+ msg: "OSProfiler connection string is: {{
osprofiler_connection_string.stdout }}"
+
+ - name: Get list of traces
+ command: "osprofiler trace list --connection-string {{
osprofiler_connection_string.stdout }}"
+ become: True
+ become_user: stack
+ register: osprofiler_trace_list
+
+ - debug:
+ msg: "{{ osprofiler_trace_list }}"
+
+ - name: Save traces to files
+ shell: |
+ osprofiler trace list --connection-string {{
osprofiler_connection_string.stdout }} > {{ osprofiler_traces_dir
}}/trace_list.txt
+ cat {{ osprofiler_traces_dir }}/trace_list.txt | tail -n +4 | head -n
-1 | awk '{print $2}' > {{ osprofiler_traces_dir }}/trace_ids.txt
+
+ while read p; do
+ osprofiler trace show --connection-string {{
osprofiler_connection_string.stdout }} --html $p > {{ osprofiler_traces_dir
}}/trace-$p.html
+ done < {{ osprofiler_traces_dir }}/trace_ids.txt
+ become: True
+ become_user: stack
+
+ - name: Gzip trace files
+ become: yes
+ become_user: stack
+ shell: "gzip * -9 -q | true"
+ args:
+ chdir: '{{ osprofiler_traces_dir }}'
+
+ - name: Sync trace files to Zuul
+ become: yes
+ synchronize:
+ src: "{{ osprofiler_traces_dir }}"
+ dest: "{{ zuul.executor.log_root }}"
+ mode: pull
+ copy_links: true
+ verify_host: true
+ rsync_opts:
+ - "--include=/**"
+ - "--include=*/"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/osprofiler-2.6.0/releasenotes/notes/redis-improvement-d4c91683fc89f570.yaml
new/osprofiler-2.8.2/releasenotes/notes/redis-improvement-d4c91683fc89f570.yaml
---
old/osprofiler-2.6.0/releasenotes/notes/redis-improvement-d4c91683fc89f570.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/osprofiler-2.8.2/releasenotes/notes/redis-improvement-d4c91683fc89f570.yaml
2019-09-04 16:25:44.000000000 +0200
@@ -0,0 +1,16 @@
+---
+features:
+ - |
+ Redis storage schema is optimized for higher performance.
+ Previously Redis driver stored each tracing event under its own key,
+ as result both list and get operations required full scan of the database.
+ With the optimized schema traces are stored as Redis lists under a key
+ equal to trace id. So list operation iterates only over unique
+ trace ids and get operation retrieves content of a specified list.
+ Note that list operation still needs to retrieve at least 1 event
+ from the trace to get a timestamp.
+upgrade:
+ - |
+ The optimized Redis driver is backward compatible: while new events are
stored
+ using new schema the driver can retrieve existing events using both old
and new
+ schemas.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/releasenotes/source/index.rst
new/osprofiler-2.8.2/releasenotes/source/index.rst
--- old/osprofiler-2.6.0/releasenotes/source/index.rst 2019-02-18
22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/releasenotes/source/index.rst 2019-09-04
16:25:44.000000000 +0200
@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
+ stein
rocky
queens
pike
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/releasenotes/source/stein.rst
new/osprofiler-2.8.2/releasenotes/source/stein.rst
--- old/osprofiler-2.6.0/releasenotes/source/stein.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/osprofiler-2.8.2/releasenotes/source/stein.rst 2019-09-04
16:25:44.000000000 +0200
@@ -0,0 +1,6 @@
+===================================
+ Stein Series Release Notes
+===================================
+
+.. release-notes::
+ :branch: stable/stein
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/setup.cfg
new/osprofiler-2.8.2/setup.cfg
--- old/osprofiler-2.6.0/setup.cfg 2019-02-18 22:53:41.000000000 +0100
+++ new/osprofiler-2.8.2/setup.cfg 2019-09-04 16:26:49.000000000 +0200
@@ -15,7 +15,9 @@
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
- Programming Language :: Python :: 3.5
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3.6
+ Programming Language :: Python :: 3.7
[files]
packages =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/test-requirements.txt
new/osprofiler-2.8.2/test-requirements.txt
--- old/osprofiler-2.6.0/test-requirements.txt 2019-02-18 22:52:33.000000000
+0100
+++ new/osprofiler-2.8.2/test-requirements.txt 2019-09-04 16:25:44.000000000
+0200
@@ -15,7 +15,7 @@
pymongo!=3.1,>=3.0.2 # Apache-2.0
# Elasticsearch python client
-elasticsearch>=2.0.0,<=3.0.0 # Apache-2.0
+elasticsearch>=2.0.0,<3.0.0 # Apache-2.0
# Redis python client
redis>=2.10.0 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/osprofiler-2.6.0/tox.ini new/osprofiler-2.8.2/tox.ini
--- old/osprofiler-2.6.0/tox.ini 2019-02-18 22:52:33.000000000 +0100
+++ new/osprofiler-2.8.2/tox.ini 2019-09-04 16:25:44.000000000 +0200
@@ -1,7 +1,7 @@
[tox]
minversion = 2.0
skipsdist = True
-envlist = py35,py27,pep8
+envlist = py27,py37,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
@@ -9,7 +9,7 @@
LANGUAGE=en_US:en
LC_ALL=C
deps =
-
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
+
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install -U {opts} {packages}
@@ -25,8 +25,8 @@
{[testenv]deps}
oslo.messaging
-[testenv:functional-py35]
-basepython = python3.5
+[testenv:functional-py36]
+basepython = python3.6
setenv = {[testenv:functional]setenv}
deps = {[testenv:functional]deps}