881 Commits

Author SHA1 Message Date
Joshua Harlow
4decea13cb Add pypi download + version badges
Change-Id: Ia49b93afd8e829c1ef47a52596df9580cecefc2a
2015-04-07 09:18:52 -07:00
Jenkins
549f3ce752 Merge "Fix typo in oslo_messaging/_drivers/protocols/amqp/opts.py" 2015-04-06 23:17:37 +00:00
Dan Prince
48441a64a6 Fix TypeError caused by err_msg formatting
The retry variable can be None which causes this exception to be
formatted incorrectly. Switching from %(retry)d to %(retry)s
should handle the case where retry is None more gracefully.

Change-Id: I592ea3e44506afb4a676d8dbe1e659a0e649424e
Closes-bug: #1440755
2015-04-06 13:10:51 -04:00
Mitsuhiro SHIGEMATSU
6a83bfbf35 Fix typo in oslo_messaging/_drivers/protocols/amqp/opts.py
This typo affects a lot of projects.

Change-Id: I98e770d1a585fae58282dc1739107bb472eaca20
2015-04-07 00:02:02 +09:00
gtt116
07c3e8b049 Do not skip functional test for amqp driver
Since bug #1438742 is fixed, enable tests.

Change-Id: Id05c04e1a1c7e0f162e3105792ad47bd44482d69
2015-04-03 07:40:51 +00:00
Jenkins
6ae44f33e8 Merge "Add functional test for notify.logger" 2015-04-02 20:14:14 +00:00
gtt116
5ec72e8c87 Add functional test for notify.logger
To make sure notify.logger always play well with messaging(v2) driver.
Achieve this by seting up a logger with target logging handler, doing real
logging, finally check notifications that receive from message broker.

Change-Id: I234457974ca48689b9dfc9f7c72b4ea37a57a40b
2015-04-01 02:03:39 +00:00
Kenneth Giusti
6f4e32ad53 Properly deserialize received AMQP 1.0 messages
Change-Id: I5c27c06ca4f5b90e5c54a9519b70f9be0232abff
Closes-bug: #1438742
2015-03-31 11:31:29 -04:00
Jenkins
711f4187d4 Merge "Make notify driver messaging play well with publish_errors" 2015-03-30 10:45:52 +00:00
gtt116
fb8c431ad6 Make notify driver messaging play well with publish_errors
When publish_errors is True, and using `messaging` notify driver,
produces a infinite loop that report sending notification error.

The reason is we always passing None to the content argument in
logger handlers (LoggingNotificationHandler, LoggingErrorNotificationHandler),
when pack the context object which expected as a dict, raise TypeError
exception, so result in infinite retry looping.

To match what document said, passing a empty dict rather than None. Also
modify unittests to make sure context is a empty dict.

Change-Id: Ic2c4c43f5bbafa8107ea370ba959da16cfa4a24c
Closes-bug: #1346466
2015-03-28 11:32:24 +00:00
Jenkins
8b15eb904e Merge "Imported Translations from Transifex" 2015-03-26 15:57:05 +00:00
Jenkins
96c548c09e Merge "Sync with latest oslo-incubator" 2015-03-26 15:53:36 +00:00
Jenkins
c5c6deb410 Merge "Don't raise Timeout on no-matchmaker results" 2015-03-26 15:31:16 +00:00
OpenStack Proposal Bot
c244126b8b Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ieed0594381856829167e0d21e769aef3cf9f5f45
2015-03-26 06:08:22 +00:00
Joshua Harlow
8da14f68d3 Use the oslo_utils stop watch in decaying timer
The decaying timer can now just use the functionality
of the oslo_utils stop watch to avoid having to maintain
similar information itself; now it just becomes a thin
layer ontop of that object that provides its functionality.

Change-Id: I1b014b821a6b980590ca5b4d850a515d55c42208
2015-03-23 20:06:22 -07:00
Jenkins
fb160c325d Merge "Remove 'UNIQUE_ID is %s' logging" 2015-03-23 16:42:46 +00:00
OpenStack Proposal Bot
ec1fb8c760 Updated from global requirements
Change-Id: I533f4943a312755e708406eeb1be78208d774fef
2015-03-21 00:17:01 +00:00
Assaf Muller
84c0d3aedc Remove 'UNIQUE_ID is %s' logging
Different OpenStack processes log that line when idle, but it doesn't
offer actionable information to developers or users. Ideally process
logs should be silent when idle, even in debug mode.

Closes-Bug: #1434727
Change-Id: I6f9f2977358d86ada7178c09b04ff6b290a6a8ad
2015-03-20 18:14:28 -04:00
Davanum Srinivas
49c6d9c5ec Sync with latest oslo-incubator
Pick up the changes in versionutils.py for Liberty

Change-Id: I478986b484009531888f7aadb511f52c8371031a
2015-03-20 16:04:41 -04:00
Jenkins
299a1ccc78 Merge "rabbit: fix ipv6 support" 2015-03-20 19:16:17 +00:00
Lukas Bezdicka
9f137948ae rabbit: fix ipv6 support
Url constructed for kombu cannot contain ipv6 address without
brackets. The url.hostname returns hosts without brackets so
we have to readd them.

Change-Id: Ifb1d358a67655af99a84b77ca813fc2dd87d87dc
2015-03-20 15:05:12 +01:00
Jenkins
2deb6fb0b2 Merge "Add pluggability for matchmakers" 2015-03-20 11:36:23 +00:00
Jenkins
ab44f86f8f Merge "Create a unique transport for each server in the functional tests" 2015-03-20 11:33:14 +00:00
Jenkins
a63022b7be Merge "Minor improvement" 2015-03-20 09:17:30 +00:00
Kenneth Giusti
3f967effe2 Create a unique transport for each server in the functional tests
Change-Id: I77a3670b3bdd3a4697b5a8b559936220cdba41ae
Closes-bug: #1421397
2015-03-19 12:47:04 -04:00
Jenkins
dcd027cc16 Merge "Publish tracebacks only on debug level" 2015-03-19 13:14:37 +00:00
Jenkins
cc84d88311 Merge "Reconnect on connection lost in heartbeat thread" 2015-03-19 11:39:45 +00:00
Jenkins
2e29b268d2 Merge "Make option [DEFAULT]amqp_durable_queues work" 2015-03-19 11:39:37 +00:00
Jenkins
eb0c330067 Merge "Imported Translations from Transifex" 2015-03-19 11:13:50 +00:00
Jenkins
e5417024c4 Merge "Fix a couple typos to make it easier to read." 2015-03-19 11:13:43 +00:00
Jenkins
3a33002960 Merge "ZeroMQ deployment guide" 2015-03-19 11:13:34 +00:00
Jenkins
642ddd98dc Merge "Fix changing keys during iteration in matchmaker heartbeat" 2015-03-19 11:13:27 +00:00
Davanum Srinivas
23dfb6ee4d Publish tracebacks only on debug level
With the new heartbeat code, there may be a lot of tracebacks
we should mute them for normal ops and log them only when
we need (enable debug level).

Change-Id: I4b729ed1a6ddad2a0e48102852b2ce7d66423eaa
2015-03-19 06:23:41 -04:00
Li Ma
53fde06c44 Add pluggability for matchmakers
Closes-Bug: #1291701

Change-Id: I2a10eca0760ef84f34e5dcdb8132845b88cd4b98
2015-03-19 03:03:53 -07:00
lqslan
b92ea91a5a Make option [DEFAULT]amqp_durable_queues work
Currently, the option amqp_durable_queues is both deprecated with name
and group that cause the option [DEFAULT]amqp_durable_queues can't work.

This patch use multi deprecated options to make it work.

Change-Id: Ied28bcf415362a976928bac75225018030304ac7
Closes-Bug: #1433956
2015-03-19 17:04:06 +08:00
Jenkins
a2a87eebbf Merge "Tiny problem with notify-server in simulator" 2015-03-19 08:59:14 +00:00
Mehdi Abaakouk
cc618a42db Reconnect on connection lost in heartbeat thread
During the log refactoring of the big heartbeat patch,
one line have been squashed (line 936):

https://review.openstack.org/#/c/146047/29..30/oslo_messaging/_drivers/impl_rabbit.py

This change reintroduces it, and improve the test to cover it.

Change-Id: I5e7162f37527580c14a809f9945114dc81451c1a
2015-03-19 09:49:26 +01:00
Li Ma
f033fc9436 Don't raise Timeout on no-matchmaker results
This patch was proposed by this review:
https://review.openstack.org/#/c/31231

The unit test is added.

Change-Id: Ie124dc22f4ef3bbaeed76186cf08924a39b52812
Co-Authored-By: Eric Windisch <ewindisch@docker.com>
Closes-Bug: #1186310
2015-03-19 00:32:01 -07:00
OpenStack Proposal Bot
f00ec93dca Imported Translations from Transifex
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I80dd54830c2d24be8878fb55ba2a16ed5ea198ea
2015-03-19 06:08:00 +00:00
Jenkins
dabdc26a1a Merge "cleanup connection pool return" 2015-03-18 22:29:39 +00:00
Jenkins
74eae520de Merge "rabbit: Improves logging" 2015-03-18 21:51:53 +00:00
Mehdi Abaakouk
0dff20b8b9 cleanup connection pool return
This change ensures that connections that fail to return to the pool are
cleanly closed and exception raised are not returned to the caller.

For rabbit, we also try to reconnection in case of connection failure,
before dropping the connection.

Closes-bug: #1433458

Change-Id: Ic714db7b8be9df8b6935a903732c60aaea0bc404
2015-03-18 18:40:20 +01:00
Mehdi Abaakouk
2d1a019427 rabbit: Improves logging
For all transport errors, we first got a log of a failure with a
backtrace like 'Fail to publish message on topic' or 'fail to consume
messages' and then another message like 'AMQP is unreachable'.

But in most case, we retry to consume/publish messages when the reason
is a connection lost.

So, now we don't log the failure message anymore in case of connection lost,
but just message related to rabbit deconnection/reconnection.
The error message and the backtrace are only logged in case of we really fail to
publish a message.

Change-Id: Ifa1b04b348b347bad0b2abec3e759a2ce7815b86
2015-03-18 18:40:20 +01:00
Doug Hellmann
0ec536bd75 fix up verb tense in log message
Change-Id: I3c407e13b4bf07ce173a789e2e6d53f0e863c66b
2015-03-18 15:32:11 +00:00
Mehdi Abaakouk
b9e134d7e9 rabbit: heartbeat implementation
AMQP offers a heartbeat feature to ensure that the application layer
promptly finds out about disrupted connections (and also completely
unresponsive peers). If the client requests heartbeats on connection, rabbit
server will regularly send messages to each connections with the expectation of
a response.

To acheive this, each driver connection object spawn a thread that
send/retrieve heartbeat packets exchanged between the server and the
client.

To protect the concurrency access to the kombu connection between the
driver and this thread use a lock that always prioritize the
heartbeat thread. So when the heartbeat thread wakes up it will acquire the
lock quickly, to ensure we have no heartbeat starvation when the driver
sends a lot of messages.

Also when we are polling the broker, the lock can be held for a long
time by the 'consume' method, so this one does the heartbeat stuffs itself.

DocImpact: 2 new configuration options for Rabbit driver

Co-Authored-By: Oleksii Zamiatin <ozamiatin@mirantis.com>
Co-Authored-By: Ilya Pekelny <ipekelny@mirantis.com>

Related-Bug: #1371723
Closes-Bug: #856764

Change-Id: I1d3a635f3853bc13ffc14034468f1ac6262c11a3
2015-03-18 15:15:33 +01:00
Li Ma
72a9984d8f Fix changing keys during iteration in matchmaker heartbeat
When starting heartbeat in matchmaker-redis, keys may be changed
during iteration and a runtime exception is thrown as follows:

RuntimeError: dictionary changed size during iteration

Change-Id: I016a449674619294196055614c62c2856002291c
Closes-Bug: #1432966
2015-03-18 03:39:11 -07:00
Fei Long Wang
cf365fe40d Minor improvement
Return the variable instead of doing useless check

Change-Id: I4c5893157f396c3f4bf6ef9d18ff1692af2c5b33
2015-03-18 16:04:24 +13:00
Li Ma
5f875c0f15 ZeroMQ deployment guide
This guide introduces the basic scenario of zeromq
driver and how to correctly deploy zeromq driver
for OpenStack.

Change-Id: I23eeafc5863b44bfbeb89ce3571a4e79b4b01d01
Closes-Bug: #1382325
2015-03-17 19:44:17 -07:00
David Medberry
410d8f0e4d Fix a couple typos to make it easier to read.
Change-Id: If5ed92aebc873fbcab705e20922706eb46da8c39
2015-03-17 15:11:11 -06:00
Davanum Srinivas
3aa565b178 Tiny problem with notify-server in simulator
First argument has to be the integer id being passed in
from threads_spawner's spawn_n method

Change-Id: I32cbc231578c44b91c2218a62bb0e47c085a4397
2015-03-17 17:10:43 -04:00