1063 Commits

Author SHA1 Message Date
lidong
b3b1ae1926 Fix a typo
Change-Id: Ie5cb0366804163309f573ca5a2bf5b129c3a8e9b
2017-08-10 01:10:47 +00:00
Kenneth Giusti
2c9ac202eb Remove the test that counts kombu connect calls
This test removes a check of the number of times kombu's
Connection.connect() method is being called for each mocked retry.
The number of calls kombu makes internally is irrelevant to proving
the API is correct.  The rest of the tests do ensure that the target
method is retried as expected, which is relevant to the API.

This change is necessary due to the kombu v4.1.0 release actually
calling Connection.connect() twice for each call to the target method
when compaired to earlier releases.

Change-Id: I3326b8e92efe3bef00b1f389d81944af9cc080f8
Closes-Bug: #1707263
2017-07-28 14:08:32 -04:00
Jenkins
78b698af28 Merge "Add monkey_patch to demo code." 2017-07-13 06:10:43 +00:00
ChangBo Guo(gcb)
60f9989920 Update URLs in documents according to document migration
Change-Id: I139d4d38e49590d50e51495b6e3b84836975c6ed
2017-07-12 22:54:02 +08:00
zhiCHang1990
1389893dd0 Add monkey_patch to demo code.
The RPC server code can not work if we
don't add eventlet.monkey_patch() at the
begining.

Change-Id: I65a162a427fb5615c95a70e6d1bbec899a78f231
2017-07-11 09:45:08 +08:00
Andrew Smith
eccdea5ceb Add kafka_driver directory
Make uniform with other drivers, kafka driver files, etc.

Change-Id: I6c6e201c304a6005ef191f96e5ac39ffaf4ab8f7
2017-06-13 08:46:50 -04:00
Mehdi Abaakouk
8ee5ae135a Fix rabbitmq driver with blocking executor
We recently move ack/requeue of messages in main/polling thread
of rabbitmq drivers. And break the blocking executor.

This one is not tested by any tests and now deprecated.

This change workaround the issue until we completely remove the
blocking executor.

Change-Id: Id479100f6ff364cf67a199e9b70f9f0c7bf7e1a9
Closes-bug: #1694728
2017-06-08 14:15:15 +02:00
Jenkins
aaaf58269c Merge "deprecated blocking executor" 2017-06-06 07:04:35 +00:00
Kenneth Giusti
1642071feb Fix serializer tests
The serializer tests occasionally fail since the order of a dict() is
not guaranteed.  Explicitly compute the serializer instead of
pre-computing it.

Change-Id: I74f8fa227e6508491b5982fe7e2841683724540c
2017-06-05 14:14:56 -04:00
Mehdi Abaakouk
2566be199a deprecated blocking executor
Using blocking executor is not recommended for application. But it looks
like some use it just because it's the default and are not aware their
should change it despite of documentation and logging message.

Choosing the application threading model is an important step
of an application.

This change deprecates it, in the future we will just make executor
mandatory. This will ensure that application make a choice.

Also this will reduce headache of oslo.messaging developers to
make the driver code working in a sync and async.

And to finish test coverage of blocking executor is 0%...

This rework some tests to remove logging.captureWarnings() that can
catch unwanted warning of other tests. Tests mocks warning instead.

Related-bug: #694728
Change-Id: Ic67164d12e7a9bed76d6e64ca2ced12e3984ff5f
2017-06-04 14:27:41 +02:00
Jenkins
8b44bfd538 Merge "Clean up the TransportURL documentation" 2017-06-02 12:58:42 +00:00
Kenneth Giusti
c7d880c33a Clean up the TransportURL documentation
Be specific regarding which characters can be used in the 'username'
and 'password' fields of the URL.

Change-Id: I9a2a801b3dd86fceffb05f4d52c715748c88d0cb
Closes-Bug: #1693967
2017-06-01 15:43:03 -04:00
Kenneth Giusti
c35fb276ce Mark the Pika driver as deprecated
The Pika driver was intended to be a more stable and performant
replacement for the default rabbit driver.  However due to lack of
both maintainers and compelling evidence that pika is superior to the
existing rabbit driver in either performance or stability it has been
deprecated for removal.

See:
http://lists.openstack.org/pipermail/openstack-dev/2017-May/116679.html

Change-Id: I98e0123edd3248be665325833283689fc3a897f7
2017-05-30 13:21:23 -04:00
Jenkins
46f9648261 Merge "rabbit: restore synchronous ack/requeue" 2017-05-22 15:28:34 +00:00
Mehdi Abaakouk
da02bc2169 rabbit: restore synchronous ack/requeue
In https://review.openstack.org/#/c/436958, we fix a thread safety
issue. But we make the ack/requeue of message asynchronous. In nominal
case, it works, but if network/rabbit connection issue occurs this
can result to rpc call handle twice. By chance we double check already
processed message ids, and drop duplicates, but that if the message
goes to another node, the mitigation won't work.

This restore the previous behavior, to ensure we run application
callback of rpc.call/rpc.cast only when the message have been
successfully ack.

Change-Id: I62b9e09513e3ebfebc64a941d4b21b6c053b511d
2017-05-21 11:42:41 +02:00
Jenkins
6feb4a6f54 Merge "Add get_rpc_transport call" 2017-05-17 10:09:26 +00:00
Jenkins
db01a0eec0 Merge "[AMQP 1.0] if RPC call is configured as presettled ignore acks" 2017-05-17 05:02:52 +00:00
Jenkins
b53667675a Merge "[AMQP 1.0] Properly shut down test RPC server" 2017-05-16 15:09:10 +00:00
Jenkins
5e194ca77a Merge "Fix the amqp1 SSL test CA certificate" 2017-05-15 19:00:49 +00:00
Kenneth Giusti
62b8ac6462 [AMQP 1.0] Properly shut down test RPC server
Otherwise the test server will hang attempting to re-connect
indefinitely.

Change-Id: I338a2f9fff4dfe08184a6476a6c47746646f63b8
2017-05-15 13:04:32 -04:00
Kenneth Giusti
12dafbb752 Fix the amqp1 SSL test CA certificate
The certificate was not being generated correctly on xenial.

Change-Id: I997d89d614957b2fb39256e98e62b68e034f09f1
2017-05-12 13:12:48 -04:00
Andrew Smith
ec4d6639bc Add get_rpc_transport call
The get_rpc_transport wraps get_transport to unify the API in
anticipation of comprehensive separation of RPC and Notification
messaging backends.

Related-Bug: 1680192
Change-Id: Ic6af07b98ff43806c2af38a3ba129991f1e0ec86
2017-05-12 12:30:41 -04:00
Kenneth Giusti
8f5cfda664 Disable AMQP 1.0 SSL unit tests
Something broke in the way SSL certs are generated. Disable these
tests for now to unblock the gate.

Change-Id: I9764da7995c198597661ecbea27efba9f76e53e3
2017-05-12 11:11:50 -04:00
Jenkins
e569c92cd9 Merge "Fix notification tests not unmocking logging" 2017-05-03 20:29:40 +00:00
Jenkins
c8ee259bac Merge "Retry support for oslo_messaging_notifications driver" 2017-05-02 04:02:06 +00:00
Jenkins
8e5e5ab218 Merge "Remove use of mox stubs" 2017-04-28 17:47:53 +00:00
Dmitry Mescheryakov
eb4f5c4fa0 Fix notification tests not unmocking logging
Right now two tests mock logging module globally which leads to
another test failure (TestRoutingNotifier.test_notify_filtered)
on my env.

Change-Id: Ifa47ee96dae79ea44dbe17a2d125401589ff13dd
2017-04-28 19:17:50 +04:00
Jenkins
b3893c13bd Merge "Fix aliases deprecation" 2017-04-28 12:47:21 +00:00
Brant Knudson
4531490b05 Remove use of mox stubs
OpenStack projects should be using mock rather than mox.
oslo.messaging was using mox's stubs via oslotest rather than
mock.patch.object. The code is converted to use mock.patch.object
via fixtures.MockPatchObject.

Change-Id: I19490b4e8211c35b237ebfd38bf2f8b8b44cbf61
2017-04-28 18:31:46 +08:00
Jenkins
e2b5577266 Merge "tests: fix MultiStrOpt value" 2017-04-27 11:04:55 +00:00
Mehdi Abaakouk
7a6474662d Fix aliases deprecation
We log deprecation message even if application doesn't use it.
And we missing the parse method.

This change fixes that.

Change-Id: I476816cb14ac8218feb74e8459cfa5f18fdb6c61
2017-04-27 12:22:52 +02:00
Mehdi Abaakouk
4818fda46e tests: fix MultiStrOpt value
Last oslo.config was magically converting MultiStrOpt "messaging" to ["messaging"],
that was not expected, oslo.messaging have a test that use "messaging"
instead of a list.

This change fixes that.

Change-Id: I65b8cc551dde6f80d979640ba3db097572f3fe9b
2017-04-27 08:46:24 +02:00
Jenkins
03e040b610 Merge "Try to fix TestSerializer.test_call_serializer failed randomly" 2017-04-27 06:41:58 +00:00
Jenkins
eef025d619 Merge "[AMQP 1.0] Add default SASL realm setting" 2017-04-25 12:30:32 +00:00
Elancheran Subramanian
cc406e4edc Retry support for oslo_messaging_notifications driver
When the underlying RPC is configured with rabbit along
with oslo_messaging_notifications, currently the retry is
not supported. There are retry support specific to drivers,
it's better to have the support uniform across the drivers,
by adding configuration retry on the oslo_messaging_notifier.

Closes-bug: 1666364

Change-Id: I8d547ef2a9e8b086f94a1efca17735f3f3cdaac1
2017-04-18 11:53:19 -07:00
Jenkins
2461f0b4ed Merge "Remove usage of parameter enforce_type" 2017-04-15 15:12:36 +00:00
Kenneth Giusti
3b53605bad [AMQP 1.0] Add default SASL realm setting
Change-Id: I2ac680bb9b594f0493dfb6d52c3f40bf5282dec7
Closes-Bug: 1681927
2017-04-13 13:46:11 -04:00
Jenkins
094f5076f2 Merge "Deprecate username/password config options in favor of TRANSPORT_URL" 2017-04-13 14:43:58 +00:00
ChangBo Guo(gcb)
4af9127cb6 Remove usage of parameter enforce_type
We deprecate and change parameter enforce_type's default value
to True[1], so don't need usage enforce_type.

[1] https://review.openstack.org/328692

Change-Id: Ib89cb9bc8afa13e13350e80ec9210ab9e878201f
2017-04-11 14:32:53 +08:00
Jenkins
058395bc5e Merge "[zmq] Prevent access to rpc_response_timeout" 2017-04-10 10:17:49 +00:00
Kenneth Giusti
d778aa5a44 [AMQP 1.0] if RPC call is configured as presettled ignore acks
The pre-settled configuration option was being ignored in the case of
RPC call transfers.

Change-Id: I35989c8a653bac0d9a7c3e33a8af2027574f4bd9
Closes-Bug: 1680905
2017-04-07 13:23:55 -04:00
Thomas Bechtold
f0b4baa707 Mock 'oslo_messaging.notify._impl_routing.LOG' in notifier tests
When running the tests with concurrency=1, 2 tests fail with:

  AttributeError: Mock object has no attribute 'debug'

and

  AssertionError: Expected 'notify' to be called once. Called 0 times

Mocking the LOG object solves the problem.

Change-Id: Ie7f4448a103fae448123a05bc92e961aac00d6ec
Closes-Bug: #1660393
2017-04-04 09:09:20 +02:00
Jenkins
e1f718d53a Merge "Add "ssl" option for amqp driver" 2017-04-03 17:52:21 +00:00
Jenkins
1b2c456383 Merge "remove all kombu<4.0.0 workarounds" 2017-04-03 16:25:53 +00:00
Jenkins
62a9370607 Merge "Break user credentials from host at the rightmost '@'" 2017-04-03 16:25:47 +00:00
Juan Antonio Osorio Robles
bf1cdafd03 Add "ssl" option for amqp driver
This uses the underlying x-ssl option that will attempt an SSL
connection to the server using the system's CA bundle.

Change-Id: I73f3b43b4ebc0c4ce4c0ba43b5a84361fb308686
2017-04-03 17:23:17 +03:00
ChangBo Guo(gcb)
06049ba602 Refactor logic of getting exector's executor_thread_pool_size
* add application scenario to help of config option
  'executor_thread_pool_size'
* Move eventlet patched checking to constructor

Change-Id: I9dc7c993c8947b51952365cc5e7b6f2daae6bb70
2017-04-03 05:16:27 +00:00
gord chung
631ade59bc remove all kombu<4.0.0 workarounds
we lower cap at kombu>=4.0.0 so no need to support kombu3 stuff

Change-Id: I4c3bc4de6026b089fffae7ae4d34f718d45cb972
2017-03-30 12:32:58 +00:00
Jenkins
093afc2455 Merge "Deprecate parameter aliases" 2017-03-30 11:43:32 +00:00
Jenkins
58e9e7b0e1 Merge "serializer: remove deprecated RequestContextSerializer" 2017-03-30 00:13:50 +00:00