Commit Graph

1350 Commits

Author SHA1 Message Date
OpenDev Sysadmins 3600f9397b OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:31:50 +00:00
Dmitriy Ukhlov 83a08d4b7e Adds unit tests for pika_poll module
Change-Id: I69cc0e0302382ab45ba464bb5993300d44679106
2016-01-04 14:49:55 -05:00
Dmitriy Ukhlov 5149461fd2 Adds tests for pika_message.py
Also small mistakes were fixed,
msg_id, unique_id and reply_q fields were
moved to corresponding AMQP properties

Change-Id: I5147c35c1a2ce0205e08ca81db164a3cc879fb0a
2015-12-19 18:42:10 -05:00
Dmitriy Ukhlov 3976a2ff81 Fixes conflicts after merging master
Change-Id: I0d75c19e3002a3aad2dd35bbaea203fa9ba0c0ea
2015-12-14 18:49:50 +02:00
Davanum Srinivas cc0f8cc8a9 Merge remote-tracking branch 'origin/master' into merge-branch
Change-Id: Ice6dcc3867dff6b7fea5647a3b79d1c765bf9d73
2015-12-14 16:21:42 +02:00
Jenkins 0b7ffdf1dc Merge "Updated from global requirements" 2015-12-12 21:00:47 +00:00
Jenkins def1b841cb Merge "Move to debug a too verbose log" 2015-12-12 07:37:30 +00:00
OpenStack Proposal Bot a5d7889174 Updated from global requirements
Change-Id: Ifd78016c067740477a82dbe06d74d5944ba91893
2015-12-11 15:24:05 +00:00
Mehdi Abaakouk 17ccb2306d Move to debug a too verbose log
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
2015-12-11 10:59:54 +01:00
Davanum Srinivas 46daf85814 Cleanup parameter docstrings
Change-Id: I301fdd51446bf0c0a6dd0d05b26da0556db8367d
2015-12-11 11:04:13 +03:00
Jenkins 0a0e6d0d50 Merge "notif: Check the driver features in dispatcher" 2015-12-11 04:17:21 +00:00
Jenkins 213176657d Merge "batch notification listener" 2015-12-11 04:16:57 +00:00
Jenkins 4b6144a3db Merge "creates a dispatcher abstraction" 2015-12-10 11:15:48 +00:00
Jenkins 8e792a5f70 Merge "Revert "default of kombu_missing_consumer_retry_timeout"" 2015-12-10 06:49:39 +00:00
Jenkins 28e9004dc1 Merge "Don't trigger error_callback for known exc" 2015-12-10 06:44:32 +00:00
Mehdi Abaakouk 3ee86964fa Revert "default of kombu_missing_consumer_retry_timeout"
This reverts commit 8c03a6db6c.

Closes-bug: #1524418
Change-Id: I35538a6c15d6402272e4513bc1beaa537b0dd7b9
2015-12-09 19:38:14 +01:00
Mehdi Abaakouk e72599435c Don't trigger error_callback for known exc
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

Change-Id: Ic1ddec2d13172532dbaa572d04a4c22c97ac4fe7
2015-12-09 18:53:38 +01:00
Dmitriy Ukhlov bee303cf6f Adds comment for pika_pooler.py
Also this patch:
1) fixed import's order
2) removes PikaDriverCompatibleWithOldRabbit
     (tests, show that after retry implementation all works fine)
Change-Id: Ib34f6db569cadb5c27d8865f13ba32ef9a6c73e9
2015-12-09 19:32:22 +02:00
Jenkins 7f08805bc9 Merge "kombu: remove compat of folsom reply format" 2015-12-09 17:22:00 +00:00
Jenkins fdfc98c6a2 Merge "Follow the plan about the single reply message" 2015-12-09 17:21:50 +00:00
Jenkins bdd6353c91 Merge "Fix notifier options registration" 2015-12-09 15:49:02 +00:00
Jenkins 251df0ec1b Merge "Fix reconnection when heartbeat is missed" 2015-12-09 15:48:58 +00:00
Mehdi Abaakouk 185693a6ed Improves comment
Change-Id: Idc8002e6d622435aac48304857985c0f82be3e32
2015-12-09 11:23:52 +01:00
Jenkins 68af439724 Merge "Fix multiline strings with missing spaces" 2015-12-09 08:36:56 +00:00
Jenkins 8717f6e38a Merge "Remove unnecessary quote" 2015-12-09 08:36:53 +00:00
Mehdi Abaakouk 148e8380ce Fix reconnection when heartbeat is missed
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.

Change-Id: I39f8cd23c5a5498e6f4c1aa3236ed27f3b5d7c9a
Closes-bug: #1493890
2015-12-09 06:45:36 +00:00
Mehdi Abaakouk 050024f798 Fix notifier options registration
Change-Id: I37082f6f349e89af6b74e6ec5e5c416902299263
2015-12-08 16:01:49 +01:00
Mehdi Abaakouk 185f94c013 notif: Check the driver features in dispatcher
The transport/driver features check is done into the get listener
methods.
So when these methods are not used the driver features checks is not
done.

This change moves it into the dispatcher layer to ensure the
requirements are always checked.

This changes a bit the behavior of when the check occurs. Before
it was during the listener object initialisation. Now this
when the listener server start.

Change-Id: I4d81a4e8496f04d62e48317829d5dd8b942d501c
2015-12-08 09:14:20 +01:00
Mehdi Abaakouk 4dd644ac20 batch notification listener
Gnocchi performs better if measurements are write in batch
When Ceilometer is used with Gnocchi, this is not possible.

This change introduce a new notification listener that allows that.

On the driver side, a default batch implementation is provided.
It's just call the legacy poll method many times.

Driver can override it to provide a better implementation.
For example, kafka handles batch natively and take benefit of this.

Change-Id: I16184da24b8661aff7f4fba6196ecf33165f1a77
2015-12-08 09:14:20 +01:00
OpenStack Proposal Bot a1fb6b9776 Updated from global requirements
Change-Id: Ie3e254b5b37a1d74eeb24ce1ae179ca9b4e84707
2015-12-08 02:32:50 +00:00
Dmitriy Ukhlov 438a808c91 Adds comment, updates pika-pool version
Change-Id: I3d9702bfdde89279258dbf0af027fa2a4a044edd
2015-12-07 16:48:21 +00:00
dukhlov bbf0efa29e Preparations for configurable serialization
This patch moves message envelope logic to driver level
and separates serialization logic from envelop logic

Change-Id: I33c52193357fe298d82b1eb36c9b95edf7e500a4
2015-12-07 18:15:20 +02:00
Mehdi Abaakouk bdf287e847 creates a dispatcher abstraction
This change creates a dispatcher abstraction
to document the interface of a dispatcher.

And also allows in the futur to have attributes with default values.

Change-Id: I9a7e5e03f89635a3790b3851f492a1a7aab58feb
2015-12-07 16:43:34 +01:00
Stanisław Pitucha 2a4f915891 Remove unnecessary quote
Change-Id: I6ec2297495c1a7ce409ea0de9a92a9720b6e2dca
2015-12-07 15:12:19 +11:00
Stanisław Pitucha 5561a6fd0f Fix multiline strings with missing spaces
Change-Id: Ide9999f6bb80f0f87500270a4fc024462bce0dbf
2015-12-07 15:10:21 +11:00
Oleksii Zamiatin 52ccff7cbc Properly skip zmq tests without ZeroMQ being installed
In this change import_zmq() doesn't raise ImportError any more
for the benefit of skipping tests.
Alarm about zmq unavailability moved to driver's init.

Change-Id: I6e6acc39f42c979333510064d9e845228400d233
Closes-Bug: #1522920
2015-12-04 23:07:09 +02:00
Mehdi Abaakouk c1d0412e2d kombu: remove compat of folsom reply format
This change removes codepath where _reply_q is not
present in the message dict.

This kind of messages have been deprecated in grizzly and cannot
be emitted since havana.

70891c271e

Change-Id: I20558d9fae8f56970c967aa0def77cfb2a1ca3ec
2015-12-04 15:25:03 +01:00
Mehdi Abaakouk 6ad70713a3 Follow the plan about the single reply message
This change removes the "send_single_reply" option as planned in the bp:

http://specs.openstack.org/openstack/oslo-specs/specs/liberty/oslo.messaging-remove-double-reply.html

Change-Id: Ib88de71cb2008a49a25f302d5e47ed587154d402
2015-12-04 15:25:03 +01:00
Jenkins ee240fbb8d Merge "default of kombu_missing_consumer_retry_timeout" 2015-12-04 13:26:17 +00:00
Jenkins a23f8707f8 Merge "rename kombu_reconnect_timeout option" 2015-12-04 13:10:00 +00:00
Jenkins 6e811ec2e5 Merge "Skip Cyrus SASL tests if proton does not support Cyrus SASL" 2015-12-04 13:03:14 +00:00
Mehdi Abaakouk 8c03a6db6c default of kombu_missing_consumer_retry_timeout
This change the default of kombu_missing_consumer_retry_timeout

The initial value of 60 seconds, have been chosen because the default
rpc_response_timeout is 60. That means, the client doesn't wait for
its reply after rpc_response_timeout is reach, so we don't need
to retry it send it its reply more than rpc_response_timeout.

But the real intent of kombu_missing_consumer_retry_timeout is
to mitigate the side effect when the rabbitmq server(s) died/failover/restart.

So the question is more how long we expect the server(s) to come back
and all the oslo.messaging applications to reconnect.

In that case 60 seconds looks a bit high.

Also this 60 seconds have a sad side effect when we can't send the reply
when the rpc client is really gone (like nova-compute restart).
The rabbitmq connection to send the reply is hold during 60 seconds.

I propose 5 seconds because,i n case of failover or restart I expect
everything because normal in less that 5 seconds.

Change-Id: I2ec174e440eb91e950d9453a9de8b97ed5888968
2015-12-04 08:00:31 +01:00
Mehdi Abaakouk 18d1708711 rename kombu_reconnect_timeout option
This change renames kombu_reconnect_timeout to missing_consumer_retry_timeout.
And improves its documentation.

Change-Id: I961cf96108db2f392b13d159f516baac9ff4e989
2015-12-04 08:00:31 +01:00
Jenkins d1e2fb3be6 Merge "Don't hold the connection when reply fail" 2015-12-03 21:06:21 +00:00
Kenneth Giusti 822b803fb0 Skip Cyrus SASL tests if proton does not support Cyrus SASL
Change-Id: I265d17a2c92b97777a5a97683b95427825872d3a
Closes-Bug: #1508523
2015-12-03 14:29:13 -05:00
Davanum Srinivas 74a0ec8b1c setUp/tearDown decorator for set/clear override
Problem with recursion shows up only in full runs
of Nova for example. So split the code that sets
up the decorator and add a method to cleanup
the decorated set_override during teardown.

Also add a decorator for clear_override similar to
the one for set_override.

Added more tests for all the above.

Change-Id: Ib16af2e770e96d971aef7f5c5d48ffd781477cfe
2015-12-03 11:13:35 +00:00
Jenkins 36fc947b15 Merge "doc: explain rpc call/cast expection" 2015-12-03 07:16:03 +00:00
Jenkins 8b764c8287 Merge "Adds comments and small fixes" into feature/pika 2015-12-03 04:14:19 +00:00
dukhlov a30fcdf585 Adds comments and small fixes
Fixes in this patch:
1) Set time_timit=0.25 for process_data_events in poll
   It is needed to release lock time to time and give
   a chance another method to be executed
2) move declare_queue_bindind method from pika_engine
   to impl_pika module because it is not common and used
   only there
3) small optimization - now unregister_reply_waiter
   is called in worst case only - if we have not got
   reply by timeout expiration

Change-Id: I18b6cdec9c1f746086a5a1ae4ecd8d8ecdaa9468
2015-12-02 14:50:48 -05:00
Davanum Srinivas b6ad95e1ca Support older notifications set_override keys
Neutron and Ceilometer use set_override to set
the older deprecated key. We should support them
using the ConfFixture

Closes-Bug: #1521776
Change-Id: I2bd77284f80bc4525f062f313b1ec74f2b54b395
2015-12-02 14:05:02 +00:00