2234 Commits

Author SHA1 Message Date
Jenkins
32758817fe Merge "kafka: Remove testing hack for kafka" 2017-01-28 10:38:36 +00:00
Mehdi Abaakouk
fe8d61345e kafka: skip multiple servers tests
I can't figure out why it doesn't pass.

Change-Id: I091c0ffd71e9a2164354cebc248af6cd3675fe07
2017-01-26 08:00:40 +01:00
Mehdi Abaakouk
578a186515 kafka: ensure topics are created
Change-Id: I3fb5ee1c134ca6ea220b204af8f6325eeadf9465
2017-01-26 08:00:40 +01:00
Mehdi Abaakouk
c7cdf2d9b7 kafka: fix python3 exception
Change-Id: I7244515f274719eb8e9189677554637e20917274
2017-01-26 08:00:40 +01:00
Mehdi Abaakouk
61c9e03b6b kafka: Remove testing hack for kafka
Change-Id: Ie304f1ed34156bfb60b9bc9acd4ad0aa5bad4657
2017-01-26 08:00:39 +01:00
ozamiatin
08b6472dbf [zmq] Failure of dynamic connections fanout
Change-Id: I740ac926141ff788e75be788ebaadb71e440c9f4
Closes-Bug: #1658601
2017-01-23 09:36:27 +02:00
4fbfd95fca Update reno for stable/ocata
Change-Id: I4d365377e6c01e040f705bf70ed86c9f1d97234e
2017-01-20 19:15:37 +00:00
Andrew Smith
58f20a8812 Return list of addresses for IPV4 and IPV6
Closes-Bug: 1657485
Change-Id: Ifd0c338442b97b2ad9476e2856af120d7080f025
2017-01-19 09:08:13 -05:00
ozamiatin
8424dbc7cb [zmq] Dynamic connections failover
ZeroMQ manages failover automatically when socket is
being connected to multiple hosts. Dynamic connections
mode assumes to connect once per message so we connect
only to a single host. However we cannot say for sure
if this host is still alive. For failover reasons
we can connect to a primary host and then add some
more hosts as failover and let ZeroMQ to decide where
it finally sends the message.

Change-Id: I19cbb75aaea8a0b725dd6a8ff665392738e164a1
2017-01-16 20:09:26 +00:00
Jenkins
f07652ae2d Merge "[zmq] Fix py35 gate" 2017-01-16 19:53:11 +00:00
Jenkins
79df3f3646 Merge "[AMQP 1.0] Fix SSL client authentication" 2017-01-16 17:45:23 +00:00
ozamiatin
07b1933531 [zmq] Fix py35 gate
Change-Id: I786908e35b2a886e9aba52b359e954d51ac9b297
2017-01-16 08:14:12 +00:00
ozamiatin
fa4054a51f [zmq] Use more stable configuration in voting job
Use static direct connections as voting job for zmq

Change-Id: I921317987dfccbd03b8c8c68fc1a169b6a8100c3
2017-01-16 10:13:17 +02:00
Eric Brown
ed2c1e3767 Remove references to Python 3.4
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.

Change-Id: I2a00ead626d9eced96487ee82b5d7857126d8355
2017-01-13 18:13:32 +00:00
Kenneth Giusti
53ead5c11d [AMQP 1.0] Fix SSL client authentication
The driver incorrectly set up SSL client authentication.  This patch
fixes the configuration. Unit tests added.

Change-Id: I64b1736f5a708c70013d9fedba73da4fa8d9ccfb
Closes-Bug: #1606985
2017-01-13 11:52:06 -05:00
Jenkins
e90792de85 Merge "[zmq] Support py35 testenv" 2017-01-13 10:08:51 +00:00
Jenkins
fbe856575a Merge "[AMQP 1.0] Resend messages that are released or modified" 2017-01-12 17:45:40 +00:00
Jenkins
268e2c5103 Merge "[zmq] Redis TTL for values" 2017-01-12 15:49:06 +00:00
Jenkins
be9d3f4182 Merge "[zmq] Refactor make zmq_address.target_to_key a universal method" 2017-01-12 15:48:56 +00:00
Jenkins
9f2b59c957 Merge "tests: cleanup monkey path" 2017-01-12 15:48:40 +00:00
ozamiatin
8c5e2bd4e1 [zmq] Support py35 testenv
Change-Id: If33583d1f89e6068b232fe09f1483c979b0ef84c
2017-01-11 14:04:35 +02:00
ozamiatin
492ffe9774 [zmq] Distinguish Round-Robin/Fanout socket sending mode
For zmq.DEALER socket there are two round-robin modes exist,
controlled by zmq.IMMEDIATE option. Immediate True means sending
only to running servers and False means to send to all connected
servers (may be not up and running at the moment).

If we do all messaging over DEALER socket as we do for direct
connections, immediate=True better suits for direct CALL/CAST
message types and immediate=False is better for fanout.

This patch fixes things for dynamic connections as for static
we already used the approach.

Change-Id: I70c7aeb3c7a2c63c128bec394827577cab580def
2017-01-11 13:26:16 +02:00
Jenkins
fe540187d5 Merge "gate: Remove useless files" 2017-01-10 19:26:47 +00:00
Mehdi Abaakouk
d64d05f3e0 tests: cleanup monkey path
This change makes the monkeypatching the first thing to do.
It removes the try/except since the tests requires eventlet.

Change-Id: Ic6bbe303d7f4a606212b46add2fa51ce14c569ae
2017-01-10 18:27:48 +01:00
Kenneth Giusti
9fab0bdbc8 [AMQP 1.0] Resend messages that are released or modified
A message ack status of 'RELEASED' or 'MODIFIED' indicates that the
message was not accepted by the destination due to some temporary
issue.  These status are used to indicate to the sender that the
message can be safely re-transmitted without risk of duplication
(i.e. the delivery is not 'in-doubt').  For example this may happen
during a message bus topology update if a message is sent before the
topology stabilizes.

This change implements re-send for these cases.

Closes-Bug: #1646586
Change-Id: I419e23b59e3eb90fda3f1c0e7ddf54ef98870e4b
2017-01-09 09:30:57 -05:00
Mehdi Abaakouk
5f4935dbc7 gate: Remove useless files
Change-Id: I368c28cbad0973831d1b92b627e5dd9138c3937b
2017-01-09 13:35:05 +01:00
Jenkins
bbf77bfcca Merge "tox: use already installed kafka if present" 2017-01-06 15:23:23 +00:00
Jenkins
fad55f603f Merge "tests: make rabbit failover failure more helpful" 2017-01-06 14:40:52 +00:00
Jenkins
a6820de99c Merge "kafka: remove no really implemented feature" 2017-01-06 09:08:16 +00:00
Jenkins
234e920b6f Merge "kafka: return to poller when timeout is reach" 2017-01-06 08:01:16 +00:00
Jenkins
a4c28cc577 Merge "eventlet is no more a hard dependency" 2017-01-06 00:38:50 +00:00
Jenkins
3db6c77675 Merge "[AMQP 1.0] Propagate authentication errors to caller" 2017-01-05 16:04:39 +00:00
Jenkins
a1fecbec58 Merge "ensure we set channel in lock" 2017-01-05 02:46:44 +00:00
Jenkins
6809dbe044 Merge "kafka: Don't hide unpack/unserialize exception" 2017-01-04 13:11:35 +00:00
Jenkins
8ac9558c6e Merge "kafka: timeout is in milliseconds" 2017-01-04 13:11:29 +00:00
Jenkins
42d1fa4aac Merge "kafka: disable batch for functional tests" 2017-01-04 13:11:23 +00:00
Jenkins
654be38629 Merge "kafka: Remove Producer singleton" 2017-01-04 13:11:21 +00:00
Jenkins
74f5dd5c1c Merge "Moving driver to new kafka-python version" 2017-01-04 13:11:06 +00:00
ozamiatin
e39be47b06 [zmq] Redis TTL for values
Redis as a key-value storage has limitations on values
expiration by ttl, only keys can expire. Regarding this
we need to introduce some redundancy and register hostnames
as keys along with general target keys to make them expire
on ttl timeout.

Change-Id: Ic0b06d8ec27b63ca49afe941a32020b5e532598c
2017-01-04 15:09:16 +02:00
Mehdi Abaakouk
31db9516c2 eventlet is no more a hard dependency
Change-Id: Ie386dea5cc4b9ff02dc2b638d2d6908c3cdad883
2017-01-04 08:10:56 +01:00
Kenneth Giusti
9972158baa [AMQP 1.0] Propagate authentication errors to caller
When the connection fails due to an authentication issue raise a
MessageDeliveryFailure on all pending send requests. Include the
authentication error message in the exception.

Change-Id: I06b40c6c480a4d082dce64801736b3d12f696c26
Closes-Bug: 1508512
2017-01-03 09:48:55 -05:00
gord chung
1dc575ce5b ensure we set channel in lock
_set_current_channel must be called  with a lock

Change-Id: I151564670946b3399158352c51d1670b9e7291fb
2017-01-03 14:39:21 +00:00
Mehdi Abaakouk
925081b2d6 tox: use already installed kafka if present
Change-Id: Ie1539035625693ec21a6ca279d59bb818343e618
2017-01-02 11:46:48 +01:00
Mehdi Abaakouk
1ee3d7001a kafka: remove no really implemented feature
Change-Id: I6f2693c48d5d0ac1af68b3d4bb5ff361facef977
2017-01-02 11:46:48 +01:00
Mehdi Abaakouk
488594936a kafka: return to poller when timeout is reach
consume() must return only if user timeout is reached and not
when driver consumer_timeout is reached.

Change-Id: I6b2b2a28038a194224e79fa37285436ca6787a0a
2017-01-02 11:46:48 +01:00
Mehdi Abaakouk
a7044799ad kafka: Don't hide unpack/unserialize exception
These exception are software bugs, don't convert them into
log for deployer.

Change-Id: I10e9112b53e5c754f38247679896d1d24dd454bf
2017-01-02 11:46:48 +01:00
Mehdi Abaakouk
c8880b6f11 kafka: timeout is in milliseconds
Change-Id: I791c5dd8e7f4fb46a0aea3e825b9b392686a2abd
2017-01-02 11:46:48 +01:00
Mehdi Abaakouk
799cd6fa8f kafka: disable batch for functional tests
Change-Id: I09a3049ca5f4647d0f6b002b3732a4c0edd43986
2017-01-02 11:46:48 +01:00
Mehdi Abaakouk
a76a51a78c kafka: Remove Producer singleton
This producer singleton works only if one transport use kafka.

If multiple transports with kafka are used, their overrides each other
the producer on each send.

This change creates only one producer per connection.

A later optimisation can be one producer per driver instance.

Change-Id: I429f7c5efcb41690dd1b17f856bda2425c788e53
2017-01-02 11:46:48 +01:00
Ilya Tyaptin
f139eb258d Moving driver to new kafka-python version
Currently Kafka driver for an oslo.messaging uses kafka-python==0.9.5
and mostly broken. This package version supports only low level Kafka
producer and consumer API which are marked as deprecated now [1]. Using
of these interfaces bring a big concern to the message processing,
because current KafkaConsumer has not any consuming coordination. This
fact causes a message duplication for the several consumers of one
topic. This behavior is specific to Ceilometer and services which read
and process notifications from other services.

New version of kafka-python allows to use async thread safe message
producers and coordinated consumers [1].

[1] http://kafka-python.readthedocs.io/en/master/changelog.html#feb-15-2016

The driver is currently experimental, python-kafka<1.0.0 API have major
issue described above that can't make the oslo.messaging driver works,
so we prefer having a working driver with a non-synced dependencies, that the
reverse.

Co-Authored-By: Mehdi Abaakouk <sileht@redhat.com>
Change-Id: I29862ed7bf56b9d8878fa8e9fb1cbd9d643908a4
2017-01-02 11:46:48 +01:00