summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't resend first reply after AMQPDestinationNotFound errorkilo-eolstable/kiloJohn Eckersberg2016-03-091-2/+5
| | | | | | | | | Change I492b82082a372763e60cf06ce0b8135ade7a6e71 was the Kilo backport of I0d3c16ea6d2c1da143de4924b3be41d1cea159bd, but during the backport the logic guarding against resending the first reply was lost. This re-adds that logic for Kilo to guard against that case. Change-Id: I2217d059f5ea3a0fe1dadd564c6ac1cc51ddac17
* Updated from global requirementsOpenStack Proposal Bot2016-02-062-2/+2
| | | | Change-Id: I52a8a76770386db253903a6ba684ef59a12b4c3f
* rabbit: set interval max for auto retryShahar Lev2016-01-181-0/+1
| | | | | | | | interval_max value is now correctly passed on to autoretry (was unused before) Closes-bug: #1535216 Change-Id: If98f7c81778b2eb93acae1d215657bf8ba21c1bb (cherry picked from commit c9f50db6d0f14802074414629901567abaee5373)
* Merge "Move to debug a too verbose log" into stable/kiloJenkins2015-12-181-5/+5
|\
| * Move to debug a too verbose logMehdi Abaakouk2015-12-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When a client is gone (died/restart) and somes replies cannot be sent because the the exchange of this client will never comeback. We log one message per reply every 0.25 messages during 60 seconds. When the only useful log is the one where we decide to drop this replies. This change moves the less important message to debug level. Change-Id: I508787c0db4dcec2c0027b89eb4e65c4f98022b9 Related-bug: #1524418 (cherry picked from commit 17ccb2306d03a74304c57d31716a54ba2b3b4311)
* | Merge "Fix reconnection when heartbeat is missed" into stable/kiloJenkins2015-12-113-2/+8
|\ \ | |/ |/|
| * Fix reconnection when heartbeat is missedMehdi Abaakouk2015-12-093-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a heartbeat is missing we call ensure_connection() that runs a dummy method to trigger the reconnection code in kombu. But also the code is triggered only if the channel is None. In case of the heartbeat threads we didn't reset the channel before reconnecting, so the dummy method doesn't do anything. This change sets the channel to None to ensure the connection is reestablished before the dummy method is run. Also it replaces the dummy method by checking the kombu connection object. So we are sure the connection is reestablished. Closes-bug: #1493890 (cherry picked from commit I39f8cd23c5a5498e6f4c1aa3236ed27f3b5d7c9a) Change-Id: Id98d4054ecbc787e0d44884a9e4c48e3fae803b2
* | Don't trigger error_callback for known excMehdi Abaakouk2015-12-102-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | When AMQPDestinationNotFound is raised, we must not call the error_callback method. The exception is logged only if needed in upper layer (amqpdriver.py). Related-bug: #1524418 Related-bug: #1521958 (cherry picked from commit Ic1ddec2d13172532dbaa572d04a4c22c97ac4fe7) Change-Id: I4bc323f0b9578cfd4972f882d6fbf59b9064ca53
* | Don't hold the connection when reply failMehdi Abaakouk2015-12-022-33/+54
|/ | | | | | | | | | | | | | | | | | | | | | | | This change moves the reply retry code to upper layer to be able to release the connection while we wait between two retries. In the worse scenario, a client waits for more than 30 replies and died/restart, the server tries to send this 30 replies to this this client and can wait too 60s per replies. During this replies for other clients are just stuck. This change fixes that. Related-bug: #1477914 Closes-bug: #1521958 (cherry picked from commit I0d3c16ea6d2c1da143de4924b3be41d1cea159bd) Conflicts: oslo_messaging/_drivers/amqpdriver.py oslo_messaging/_drivers/impl_rabbit.py Change-Id: I492b82082a372763e60cf06ce0b8135ade7a6e71
* Merge "Updated from global requirements" into stable/kiloJenkins2015-11-052-2/+2
|\
| * Updated from global requirementsOpenStack Proposal Bot2015-09-172-2/+2
| | | | | | | | Change-Id: I186995248d39abafd8a1e959231aad5329f4627f
* | rabbit: shuffle hosts before building kombu URLJohn Eckersberg2015-10-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores behavior as it was back in the Juno cycle. This was changed in a refactor during the Kilo cycle (973301aa) when the kombu failover_strategy was set to shuffle. But the failover_strategy only affects failovers; it does not influence which host receives the initial connection. Thus, if multiple hosts are given, the first host will receive all of the initial connections. By shuffling the hosts before building the URL given to kombu, rudimentary load balancing is achieved and connections are more evenly spread across broker nodes. Change-Id: Ieecaf5f286f49302db29df9854359ef5d36b7a89 (cherry picked from commit f2beb5eaf158f76cdb8be0ca72965503be423ee2)
* | Update path to subunit2html in post_test_hookFlavio Percoco2015-10-202-3/+3
|/ | | | | | Related change in project-config: Ib65c41fc5f137eedb21fccfcee1e96b6990ae30d Change-Id: I070f027b7890f846971fb4a768d2de4402ee32f0
* rabbit: redeclare consumers when ack/requeue failMehdi Abaakouk2015-08-282-0/+23
| | | | | | | | | | | | | | | | | | | | | | | In case the acknowledgement or requeue of a message fail, the kombu transport can be disconnected In this case, we must redeclare our consumers. This changes fixes that. This have no tests because the kombu memory transport we use in our tests cannot be in disconnected state. Closes-bug: #1448650 (cherry picked from commit 415db68b67368d7c8aa550e7108122200816e665) Conflict is due to refactoring on master branch. Conflicts: oslo_messaging/_drivers/impl_rabbit.py Change-Id: I5991a4cf827411bc27c857561d97461212a17f40
* Fix gate jobs in stable/kilo (4 backports)Flavio Percoco2015-08-2810-53/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains 4 backports from master. Unfortunately, an update on f21 is forcing to update the requirements for amqp1. Therefore, we need these 2 commits, which depend on each other, to be backported as one. To fix py27 unittests we should backport two more patches as well. Commit 1: Enable amqp's protocol unit tests everywhere Now that python-qpid-proton has taken an approach similar to zmq's, it's possible to install it in boxes where the C libraries are not present in the system. This patch takes advantage of that to enable amqp protocol's tests everywhere. Note that the backport was modified to match the stable/kilo gate configuration. This job, in Kilo, is supposed to run *just* on f21, therefore, I've removed the changes to the tox.ini to avoid installing the dependencies everywhere. Master-Change-Id: Ibce4c791aafadf45fa876d6a4f5373fde94769ff (cherry picked from commit f06b19628fbb11a32797f1095eba7c07b6343433) Commit 2: Fix qpid's functional gate The loggin verbosity changed in 0.32 which our gate is pulling from the updates repository. This patch updates the script to make it work again. Closes-bug: #1468917 Master-Change-Id: I88a1bc794246beb156d4301bd503fa51a7cd2cce (cherry picked from commit 079c04f0d06539f3507c772ccc68807a6d01a73a) Commit 3: Fix list_opts test to not check all deps The list_opts entrypoint test failed unnecessarily when the dependencies in the packages were inconsistent. This test doesn't need to verify that the dependencies are consistent, only that the entrypoint is available and provides the expected function. (cherry picked from commit 3d483fda709d2d04db2222e0119eaa54de5f5867) Commit 4: Fix mock use for mock 1.1.0 Correct the way we check the calls by using the proper mock method. Add a new test to expand coverage of the area being fixed. (cherry picked from commit c7b31385ac3616060ef0f2188fb724191caad03c, but the new tests was removed) Co-Authored-By: Viktor Serhieiev <vsergeyev@mirantis.com> Closes-Bug: #1488456 Change-Id: If781c808b1f1428dbc24b92cd0b8f8b7904c0ed4
* Merge "Don't use devstack to setup our functional env" into stable/kiloJenkins2015-06-199-53/+202
|\
| * Don't use devstack to setup our functional envMehdi Abaakouk2015-06-159-53/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a setup script for each tox functional target to start a rabbitmq-server, qpidd or redis daemon dedicated for the functional testing. This script is responsible to spawn a preconfigured daemon needed for the functional tests. This also changes the gate script to just install the required packages instead of setup a devstack. This also fixes the zmq config options loading in tests Closes-bug: #1442612 Change-Id: I27eb2c1d3d0ca67aa361c83e41372138e03d9bdd (cherry picked from commit 80ece65a547db332b345a0a433f17602af058b56)
* | Use `inferred=True` by defaultFlavio Percoco2015-06-161-2/+6
|/ | | | | | | | | | Rabbitmq's amqp1.0 plugin doesn't have support for vbin8, which is the default encoding used by qpid-proton. In order to workaround this issue we should use inferred=True. Closes-bug: #1465409 Change-Id: Id265917244d7e152c5e13a10df367a3e59de8e50 (cherry picked from commit c8845b4bef4248fad4a9da8dad0455495b2bc6fd)
* Merge "Adding Publisher Acknowledgements/confirms" into stable/kilo1.8.3Jenkins2015-06-092-2/+4
|\
| * Adding Publisher Acknowledgements/confirmsDavanum Srinivas2015-06-092-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the vancouver summit, Michael Klishin from pivotal proposed we should use publisher confirms as the default setting to reduce messages being dropped on the floor. https://www.rabbitmq.com/confirms.html http://www.rabbitmq.com/blog/2011/02/10/introducing-publisher-confirms/ This setting is a lightweight way of keeping track of which messages have been processed by the broker and which would need re-publishing in case of broker shutdown or network failure. Change-Id: I25bc955df130dad4725f5281211d37fd73e7ea63 (cherry picked from commit cd63a7023519b82a46b3f29f2691ff32c5085c9f)
* | Merge "rabbit: Set timeout on the underlying socket" into stable/kiloJenkins2015-06-091-153/+176
|\ \
| * | rabbit: Set timeout on the underlying socketMehdi Abaakouk2015-06-041-153/+176
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- NOTE(mriedem): This is two commits squashed to address a problem with the rabbitmq heartbeat patch in stable/kilo (since oslo.messaging 1.8.1). -- rabbit: Remove unused stuffs from publisher The publisher code is over engineered, it allows to override everything, but this is never used. None of the child Class have the same signature, sometimes the constructor use the parameter name as the parent class but for a different purpose, that make the code hard to read. It's was never clear which options is passed to the queue and the exchange at this end to kombu. This changes removes all of that stuffs, and only use the kombu terminology for publisher parameters. (cherry picked from commit cca84f66d49114ce4ae85af4bbf03a14bda79121) -------------------------------------------- rabbit: Set timeout on the underlying socket They are some case where the underlying can be stuck until the system socket timeout is reached, but in oslo.messaging we very often known that is not needed to wait for ever because the upper layer (usualy the application) expect to return after a certain period. So this change set the timeout on the underlying socket each we can determine that is not needed to wait more. Closes-bug: #1436788 Change-Id: Ie71ab8147c56eaf672585da107bec8b22af9da6c (cherry picked from commit 77f952a1f7d87c35fb5d7eb7e052c5b9def59b22)
* | consumer connections not closed properlygordon chung2015-06-092-7/+7
| | | | | | | | | | | | | | | | | | | | heartbeat_thread is not set for listeners. when closing connection, it blindly checks heartbeat_thread and will throw an error causing connection to remain open. this patch explicitly sets heartbeat_thread to None. Change-Id: Ief3bf02f952882ecadf742cdd0bac8edd7812473 Closes-Bug: #1458917
* | Updated from global requirementsOpenStack Proposal Bot2015-06-044-18/+18
|/ | | | Change-Id: I45ceb7874228335183f1296825108c04e522e9fd
* rabbit: add some notes about heartbeat1.8.2Mehdi Abaakouk2015-04-272-1/+3
| | | | | | | | Heartbeat is supported only with recent version of kombu (>=3.0.7) and amqp (>=1.4.0) Related-bug: #1436769 Change-Id: I938741d953b4db9e6f56858677220c5d6624af2d
* Disable and mark heartbeat as experimentalMehdi Abaakouk2015-04-242-3/+9
| | | | | | | | | | | | | | Due to some discovered issues since heartbeat is enabled by default. Specially #1436788, that needs to fix the underlying library, too. So, according to the discution here: https://bugs.launchpad.net/oslo.messaging/+bug/1436769/comments/10 We decide to mark the implementation as experimental and disable it by default. Related-bug: #1436788 Related-bug: #1436769 Change-Id: Ib7c55977f976bdbbc8df4ad5915e0433cbf84a17 (cherry picked from commit 287a4f56f45ed9cd40116a9e7b6e529f3382a925)
* rabbit: fix ipv6 supportLukas Bezdicka2015-04-233-2/+29
| | | | | | | | | 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 (cherry picked from commit 9f137948ae3245f2ddaf7a21eb5a570ad0c81934)
* Merge "Fix the bug redis do not delete the expired keys" into stable/kiloJenkins2015-04-132-1/+14
|\
| * Fix the bug redis do not delete the expired keyszhangjl2015-04-092-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using redis as zmq backend, the keys in redis maybe like follows: "service" "service.host1" "service.host1.host1" "service.host2" "service.host2.host2" "service.host3" "service.host3.host3" If we stopped the service on host1, the key named service.host1 and service.host1.host1 shoule be delete. As the result, the topicexchange message would not sent to host1. But the fact is service.host1 still exsit, and topicexchange message may still sent to host1. To resolve this problem , change the comparison of ttl function from -1 to -2 according to http://redis.io/commands/ttl Change-Id: I5c0af97019fffed6e949eb58d7d60c85f5b08ea1 Closes-Bug:#1417464 (cherry picked from commit 1958f6e549d3769202960f5af93982afea74cd80)
* | Merge "Don't raise Timeout on no-matchmaker results" into stable/kiloJenkins2015-04-132-2/+40
|\ \
| * | Don't raise Timeout on no-matchmaker resultsLi Ma2015-04-092-3/+41
| |/ | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit f033fc9436b6f3bc924f19e1457b3cbc85ea548a)
* | Merge "Add pluggability for matchmakers" into stable/kiloJenkins2015-04-132-10/+28
|\ \
| * | Add pluggability for matchmakersLi Ma2015-04-092-10/+28
| |/ | | | | | | | | | | | | Closes-Bug: #1291701 Change-Id: I2a10eca0760ef84f34e5dcdb8132845b88cd4b98 (cherry picked from commit 53fde06c44d004e28ba3741ac50386e046306285)
* | Fix changing keys during iteration in matchmaker heartbeatLi Ma2015-04-091-1/+1
|/ | | | | | | | | | | 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 (cherry picked from commit 72a9984d8f28933fadf0f186bc40cc3454fc9353)
* set defaultbranch for reviewsDoug Hellmann2015-04-061-0/+1
| | | | Change-Id: Ic96bec9becd5e9bedd08fc1972d08c77bb224b3d
* Merge "Publish tracebacks only on debug level" into stable/kilo1.8.1Jenkins2015-03-251-6/+8
|\
| * Publish tracebacks only on debug levelDavanum Srinivas2015-03-241-6/+8
| | | | | | | | | | | | | | | | | | 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 (cherry picked from commit 23dfb6ee4d5abb31552490e80c2f57187b00fb34)
* | Merge "Reconnect on connection lost in heartbeat thread" into stable/kiloJenkins2015-03-252-1/+8
|\ \ | |/
| * Reconnect on connection lost in heartbeat threadMehdi Abaakouk2015-03-242-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit cc618a42db8ba6249288efab9af8b87cc282c432)
* | Merge "cleanup connection pool return" into stable/kiloJenkins2015-03-253-3/+31
|\ \ | |/
| * cleanup connection pool returnMehdi Abaakouk2015-03-243-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit 0dff20b8b979d902d855aa1c0ae0f4b9398a3116)
* | Merge "rabbit: Improves logging" into stable/kiloJenkins2015-03-253-29/+59
|\ \ | |/
| * rabbit: Improves loggingMehdi Abaakouk2015-03-243-29/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit 2d1a019427178daadf554217526082a6d9a35ac8)
* | Merge "fix up verb tense in log message" into stable/kiloJenkins2015-03-252-3/+3
|\ \ | |/
| * fix up verb tense in log messageDoug Hellmann2015-03-242-3/+3
| | | | | | | | | | Change-Id: I3c407e13b4bf07ce173a789e2e6d53f0e863c66b (cherry picked from commit 0ec536bd7547e3fb37932390b20b7ecc11ee502d)
* | Merge "rabbit: heartbeat implementation" into stable/kiloJenkins2015-03-258-39/+424
|\ \ | |/
| * rabbit: heartbeat implementationMehdi Abaakouk2015-03-248-39/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit b9e134d7e955b9180482d2f7c8844501c750adf6)
* | Add support for multiple namespaces in TargetsAssaf Muller2015-03-203-2/+21
|/ | | | | | | | | | | | | | | | In order for projects to use the namespace property of Targets in a backwards compatible way (To support rolling upgrades), a Target may now belong to more than a single namespace (i.e. 'namespace1' and None). This way, if the server is upgraded first, the version that introduces namespaces to a project will place the server RPC methods in ['some_namespace', None]. Pre-upgrade agents will send messages in the null namespace while post-upgrade agents will send messages in 'some_namespace', and both will be accepted. Change-Id: I713fe9228111c36aa3f7fb95cbd59c99100e8c96 Closes-Bug: #1430984 (cherry picked from commit 3be95adcebfef6e862eda2827a216048b4e9007a)
* Merge "NotifyPublisher need handle amqp_auto_delete"1.8.0Jenkins2015-03-071-0/+2
|\
| * NotifyPublisher need handle amqp_auto_deleteMehdi Abaakouk2015-03-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Notifypublisher and TopicConsumer must create the exchange and the queue with the same parameters otherwise kombu raises a 'PreconditionFailed' error. But when cfg.CONF.amqp_auto_delete = True, this is not the case. This change ensures that amqp_auto_delete correclty set when cfg.CONF.amqp_auto_delete = True. Closes bug: #1366597 Change-Id: I8c661deae82bcf2ae2e114621e69e0c7ae2a0a69