* Update oslo.messaging from branch 'master'
to e978eb920f0c55243c0ee6c00aa95dc69b5234c0
- Merge "Make oslo.messaging, magnum, and zaqar reproducible."
- Make oslo.messaging, magnum, and zaqar reproducible.
Whilst working on the Reproducible Builds effort [0], we noticed that
python-oslo.messaging could not be built reproducibly.
This is because the documentation captures the hostname of the build
system.
[0] https://reproducible-builds.org/
This patch uses sample_default from oslo.config to fix this.
Please accept this patch to fix oslo.messaging, magnum, and zaqar
(at least, probably others).
Change-Id: Ie8717e182f709cbddd645a356789e262b47646d3
* Update oslo.messaging from branch 'master'
to 41fc2a2d35d8fbfbeddf8d8d920a546bda5f1bb6
- Merge "Use StopWatch timer when waiting for message"
- Use StopWatch timer when waiting for message
When waiting for a message in a queue, the queue.get(block=True) prevent
the heartbeats to be sent at correct interval.
So instead of blocking the thread, doing a loop using a StopWatch timer
until the timeout is reached.
Closes-Bug: #2035113
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: Ie5cf5d2bd281508bcd2db1409f18ad96b0822639
* Update oslo.messaging from branch 'master'
to 986cd4ab240ddeb5022513f6eccc4cb48e8d3de0
- Merge "Fix incorrect desc of rabbit_stream_fanout option"
- Fix incorrect desc of rabbit_stream_fanout option
Description of rabbit_stream_fanout option is incorrect. Actually it
reuses the description of quorum queues. So we need to fix it with a
correct stream queue description.
Closes-Bug: #2058616
Change-Id: I614280c656f7d5fe9043abee93218a9907c395ff
Signed-off-by: frankming <chen27508959@outlook.com>
* Update oslo.messaging from branch 'master'
to 63f95e92c354cd517ae3bbbd8b4f373bf1c76615
- Merge "kafka: Fix invalid hostaddr format for IPv6 address"
- kafka: Fix invalid hostaddr format for IPv6 address
When IPv6 address is used for host, the hostaddr should be formatted
in [<address>]:<port> format instead of <address>:<port> format. This
ensures the correct format is used.
Closes-Bug: 1907702
Change-Id: I6f4a453a69e942d5b2d66ffeca6960b85c8bc721
* Update oslo.messaging from branch 'master'
to 9b398708197cb793aea0011aaf0700ffe5ce42fd
- Merge "Restore read stream queues from last known offset"
- Restore read stream queues from last known offset
When an agent reconnected to a rabbitmq server, it would start
consumming messages from the last offset available in the stream.
This could cause important messages to be lost.
With this patch, oslo_messaging will keep track of the last consummed
offset and restore reading from that point.
Related-bug: #2031497
Change-Id: I449008829b0c0a1a759c211b83f7a99d9c7f2c0d
* Update oslo.messaging from branch 'master'
to 88db1068f7902f003ac5c457f320aeec9da031f2
- Merge "reno: Update master for unmaintained/xena"
- reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.
Change-Id: Id791caea9242f54b455874cc4bef69b4fd87e3dc
* Update oslo.messaging from branch 'master'
to 3cc149716c234551b23c84d0f47a5e291ce823d1
- Merge "reno: Update master for unmaintained/wallaby"
- reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.
Change-Id: I77d6152203fda5c8acc4dff534562b39b5d7d23b
* Update oslo.messaging from branch 'master'
to a1d91f854b875d79659cf6b752192299e36de485
- Merge "reno: Update master for unmaintained/victoria"
- reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.
Change-Id: Id7136e880a93b0f9de1698bcacddc6b99afbc533
* Update oslo.messaging from branch 'master'
to 3642a1b3683daf3f362a13eb7ef28e0b249265bc
- Update master for stable/2024.1
Add file to the reno documentation build to show release notes for
stable/2024.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.
Sem-Ver: feature
Change-Id: I6052756356771e89333f17b644fc93dd9326d529
* Update oslo.messaging from branch 'master'
to ebdc7db19eafec27b1a231e1ccfb19d141e17a93
- Merge "Display the reply queue's name in timeout logs"
- Display the reply queue's name in timeout logs
It would be helpful if "Timed out waiting for <service>" log messages at least
specified on which `reply_q` it was waited for.
Example without the reply_q:
```
12228 2020-09-14 14:56:37.187 7 WARNING nova.conductor.api
[req-1e081db6-808b-4af1-afc1-b87db7839394 - - - - -] Timed out waiting for
nova-conductor. Is it running? Or did this service start before
nova-conductor? Reattempting establishment of nova-conductor connection...:
oslo_messaging.exceptions.MessagingTimeout: Timed out waiting for a reply to
message ID 1640e7ef6f314451ba9a75d9ff6136ad
```
Example after adding the reply_q:
```
12228 2020-09-14 14:56:37.187 7 WARNING nova.conductor.api
[req-1e081db6-808b-4af1-afc1-b87db7839394 - - - - -] Timed out waiting for
nova-conductor. Is it running? Or did this service start before
nova-conductor? Reattempting establishment of nova-conductor connection...:
oslo_messaging.exceptions.MessagingTimeout: Timed out waiting for a reply
(reply_2882766a63b540dabaf7d019cf0c0cda)
to message ID 1640e7ef6f314451ba9a75d9ff6136ad
```
It could help us to more merely debug and observe if something went
wrong with a reply queue.
Change-Id: Ied2c881c71930dc631919113adc00112648f9d72
Closes-Bug: #1896925
* Update oslo.messaging from branch 'master'
to a0f3a7ddafec62a45152ba26bb01e207f8476956
- Merge "Display coverage report"
- Display coverage report
... for easy reference. Also make sure old data is purged.
Change-Id: Ic017107ae15fa33cdfd4866f812af9a583a32f14
* Update oslo.messaging from branch 'master'
to 94a3ebcb4dcfd22d071c495beebb31d9bf7310ca
- reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.
Change-Id: I90b84b3d4995c54e70db680fde83c83034f478f6
* Update oslo.messaging from branch 'master'
to b5244bd05a7e712b0f3f6513f061de25c0048d30
- Merge "Bump hacking (again)"
- Bump hacking (again)
The previous attempt did not update the version in pre commit config
so the old version is still used by pep8 target.
Change-Id: Idf8c7d99f7c6aeb0244d58e85524ba1f039195d8
* Update oslo.messaging from branch 'master'
to ef381d2172abb23642b15611d1c45d06a0d95f17
- Merge "Remove scenario 03/04 tests from CI"
- Remove scenario 03/04 tests from CI
We should have removed these when we removed the tox targets[1].
[1] 6e7a5725fa90e66c060a06a8ffe5e5454fd7a7b6
Change-Id: I4bdf987ea52479ef7790fc506158a57d8d060dc5
* Update oslo.messaging from branch 'master'
to 22634362a81c62f49eec6afc6dc077bdbd4e4144
- Bump hacking
hacking 4.0.x is too old.
Change-Id: Ide85649ba04efcc295f4dae6f5147d351666daa3
* Update oslo.messaging from branch 'master'
to 98f4f81186433b6098654e482eb7bfa6dda1aa7d
- Merge "Bump bandit"
- Bump bandit
Use a more recent version because why not.
Change-Id: I41538fd85956780250e3b7440130381151991b9c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Update oslo.messaging from branch 'master'
to 6a1f4618c2187a059e974d67dc72b8bed660ac7d
- Merge "Drop unused function from scenario test script"
- Drop unused function from scenario test script
This function is no longer used since we removed ampq1 tests, when we
deprecated the amqp1 driver[1]
[1] 0f63c227f5425995ae8c61f1d40ec85e7728528a
Change-Id: I47fe04d6a39ed2b5f33b02fa6736d588d0383f5a
* Update oslo.messaging from branch 'master'
to d43696c284c74d5eb3bf51e299cdeea39dcab6e7
- Merge "Update the python search path for extra qdrouter modules"
- Update the python search path for extra qdrouter modules
The latest release of qdrouterd on focal has changed where the
internal python modules are installed. This patch updates the tox
tests python path configuration.
Change-Id: Icb53ee17af01580d899f388f69be9560e23675e0
* Update oslo.messaging from branch 'master'
to a417b425a092623f9fe0e7c096175dbccdd71d49
- Merge "Add an option to use rabbitmq stream for fanout queues"
- Add an option to use rabbitmq stream for fanout queues
This is introducing the "stream" queues for fanout so all components
relying on fanout can use the same stream, lowering the number of queues
needed and leveraging the new "stream" type of queues from rabbitmq.
Closes-Bug: #2031497
Change-Id: I5056a19aada9143bcd80aaf064ced8cad441e6eb
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
* Update oslo.messaging from branch 'master'
to 800c58826ebc0effe00664f68aa5fe929899a971
- Utilize the new RequestContext redacted_copy method
We now expect context objects to support returning a redacted copy of
themselves.
As a related cleanup, removed the practice entirely of using
dictionaries to represent contexts in unit tests and the logging driver.
As part of developing this change, I discovered code in Glance (and
potentially other services) which explicitly pass {} in lieu of a
context when notifying; so we now properly handle dictionaries as
contexts.
To ensure we have the method required; require oslo.context 5.3.0 or
newer.
Change-Id: I894f38cc83c98d3e8d48b59864c0c7c2d27e7dcd
* Update oslo.messaging from branch 'master'
to 6ad1ccf89cf909f2bbd5321dcd991df22fa891db
- Merge "Add QManager to amqp driver"
- Add QManager to amqp driver
The purpose of this change is to introduce an optional mechanism to keep
the queues name consistent between service restart.
Oslo messaging is already re-using the queues while running, but the
queues are created using a random name at the beginning.
This change propose an option named use_queue_manager (default to False
- so the behavior is not changed) that can be set to True to switch to a
consistent naming based on hostname and processname.
Related-bug: #2031497
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: I2acdef4e03164fdabcb50fb98a4ac14b1aefda00
* Update oslo.messaging from branch 'master'
to ee5b35174236708842945d08f7e5c29c621b7921
- Update python classifier in setup.cfg
As per the current release tested runtime, we test
python version from 3.8 to 3.11 so updating the
same in python classifier in setup.cfg
Change-Id: I303912894d12be87355f83a1a53be071db94cf84
* Update oslo.messaging from branch 'master'
to 875506fff0e4211ffaf12b91195cc08968864591
- Merge "Enable use of quorum queues for transient messages"
- Enable use of quorum queues for transient messages
Add a new flag rabbit_transient_quorum_queue to enable the use of quorum
for transient queues (reply_ and _fanout_)
This is helping a lot OpenStack services to not fail (and recover) from
a rabbit node issue.
Related-bug: #2031497
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: Icee5ee6938ca7c9651f281fb835708fc88b8464f
* Update oslo.messaging from branch 'master'
to 37888462d159efcad26be3dfc174b7f9538774b0
- Merge "Fix clearing of the fake RPC Exchange"
- Fix clearing of the fake RPC Exchange
The current fake driver does not properly clean up the fake RPC exchange
between tests.
This means that if a test invokes code that makes an RPC request, using
the fake driver, without consuming the RPC message, then another test
may receive this request making it fail.
This issues has been found while working on a Cinder patch and has been
worked-arounded there with Change-Id
I52ee4b345b0a4b262e330a9a89552cd216eafdbe.
This patch fixes the source of the problem by clearing the exchange
class dictionary in the FakeExchangeManager during the FakeDriver
cleanup.
Change-Id: If82c2175cf7242b80509d180cdf92323c0f4c43b
* Update oslo.messaging from branch 'master'
to e2b2008ed91c61ddaafaff113815bf251eb63f9b
- Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can generate
translation files without them.
Change-Id: Ib60671941371aa22fbdeeb9d42fc619f60aa15e5
* Update oslo.messaging from branch 'master'
to 8e3c523fd74257a78ceb384063f81db2e92a2ebd
- Auto-delete the failed quorum rabbit queues
When rabbit is failing for a specific quorum queue, the only thing to
do is to delete the queue (as per rabbit doc, see [1]).
So, to avoid the RPC service to be broken until an operator eventually
do a manual fix on it, catch any INTERNAL ERROR (code 541) and trigger
the deletion of the failed queues under those conditions.
So on next queue declare (triggered from various retries), the queue
will be created again and the service will recover by itself.
Closes-Bug: #2028384
Related-bug: #2031497
[1] https://www.rabbitmq.com/quorum-queues.html#availability
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: Ib8dba833542973091a4e0bf23bb593aca89c5905
* Update oslo.messaging from branch 'master'
to f23f3276c4f8c156c7a917ffd05db6b3b010b807
- Allow creating transient queues with no expire
When an operator rely on rabbitmq policies, there is no point to set the
queue TTL in config.
Moreover, using policies is much more simpler as you dont need to
delete/recreate the queues to apply the new parameter (see [1]).
So, adding the possibility to set the transient queue TTL to 0 will
allow the creation of the queue without the x-expire parameter and only
the policy will apply.
[1] https://www.rabbitmq.com/parameters.html#policies
Related-bug: #2031497
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: I34bad0f6d8ace475c48839adc68a023dd0c380de
* Update oslo.messaging from branch 'master'
to f455edd60153116397a4c240dd1194861cb0bbf1
- Merge "Bump bandit and make oslo.messaging compatible with latest rules"
- Bump bandit and make oslo.messaging compatible with latest rules
- Apply a timeout to requests calls to avoid uncontrolled
resource consumption (CWE-400) [1].
- Ignore CWE 377
[1] https://cwe.mitre.org/data/definitions/400.html
[2] https://cwe.mitre.org/data/definitions/377.html
Change-Id: Ic558ad392424a25b5fd9a10749163d8427159eda
* Update oslo.messaging from branch 'master'
to 38c86a93adbd40220892e4cea91de9a5d400c9d7
- Merge "Set default heartbeat_rate to 3"
- Set default heartbeat_rate to 3
Kombu recommend to run heartbeat_check every seconds but we use a lock
around the kombu connection so, to not lock to much this lock to most of
the time do nothing except waiting the events drain, we start
heartbeat_check and retrieve the server heartbeat packet only two times
more than the minimum required for the heartbeat works:
heartbeat_timeout / heartbeat_rate / 2.0
Because of this, we are not sending the heartbeat frames at correct
intervals. E.G.
If heartbeat_timeout=60 and rate=2, AMQP protocol expects to send a
frame
every 30sec.
With the current heartbeat_check implementation, heartbeat_check will be
called every:
heartbeat_timeout / heartbeat_rate / 2.0 = 60 / 2 / 2.0 = 15
Which will result in the following frame flow:
T+0 --> do nothing (60/2 > 0)
T+15 --> do nothing (60/2 > 15)
T+30 --> do nothing (60/2 > 30)
T+45 --> send a frame (60/2 < 45)
...
With heartbeat_rate=3, the heartbeat_check will be executed more often:
heartbeat_timeout / heartbeat_rate / 2.0 = 60 / 3 / 2.0 = 10
Frame flow:
T+0 --> do nothing (60/3 > 0)
T+10 --> do nothing (60/3 > 10)
T+20 --> do nothing (60/3 > 20)
T+30 --> send a frame (60/3 < 30)
...
Now we are sending the frame with correct intervals
Closes-bug: #2008734
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: Ie646d254faf5e45ba46948212f4c9baf1ba7a1a8
* Update oslo.messaging from branch 'master'
to 8759cd7d9aff028fd84ab696769e35193b8e6a17
- Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I59074f7789476cdfb861be97c60b720bc3ccba54
* Update oslo.messaging from branch 'master'
to a3715386de5b4f70ab396c2cc298fd4a495fe214
- test py311 job
this patch fixes the py3.11 job by updating bindep.txt
Change-Id: I8eeb1b345033269a98989ef4a563ca65fe04e57f
* Update oslo.messaging from branch 'master'
to 3c8dd7d290a222abc864bd36c2180f4afc60a4c8
- Merge "Add is_admin to safe fields list for notifications"
- Add is_admin to safe fields list for notifications
We encountered bug 2037312 in unit tests when attempting to get this
change rolled out. Heat apparently will attempt to set is_admin using
policy logic if it's not passed in for a new context; this breaks as the
context we are requested doesn't have all the needed information to
exercise the policy logic.
is_admin is just a bool; it's not sensitive; easiest route forward is to
add it to the safe list
Closes-bug: 2037312
Change-Id: I78b08edfcb8115cddd7de9c6c788c0a57c8218a8
* Update oslo.messaging from branch 'master'
to 84d489eeadabdc5b3b8d48cc62706633ca598472
- Merge "Add Python3 antelope unit tests"
- Add Python3 antelope unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope.
See also the PTI in governance [1].
[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html
Change-Id: Iad97644ff56b721fda6a16d51e373709d6f8ee9d
* Update oslo.messaging from branch 'master'
to 7705b4f3023e0e63f3b37e9a25c774f309fec55e
- Update master for stable/2023.2
Add file to the reno documentation build to show release notes for
stable/2023.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.
Sem-Ver: feature
Change-Id: I8e9c35ebe41e0283309d64db97a4d9ffebcf9626
* Update oslo.messaging from branch 'master'
to 3485301b1838353c16c6dd1c1cfbcab866df2e5d
- Merge "Only allow safe context fields in notifications"
- Only allow safe context fields in notifications
Publishing a fully hydrated context object in a notification would give
someone with access to that notification the ability to impersonate the
original actor through inclusion of sensitive fields.
Now, instead, we pare down the context object to the bare minimum before
passing it for serialization in notification workflows.
Related-bug: 2030976
Change-Id: Ic94323658c89df1c1ff32f511ca23502317d0f00
* Update oslo.messaging from branch 'master'
to fa1563004134e32b137605709bd7755986883025
- Merge "Deprecate the amqp1 driver and Remove qpid functional tests"
- Deprecate the amqp1 driver and Remove qpid functional tests
A recent oslo.messaging patch [1], not yet merged, who aim to update the
test runtime for antelope lead us to the following error:
```
qdrouterd: Python: ModuleNotFoundError: No module named 'qpid_dispatch'
```
Neither debian nor ubuntu in the latest releases have any binary
built for the qpid backend, not even 3rd party. Only qpid proton,
the client lib, is available.
To solve this issue, these changes propose to deprecate the AMQP1 driver
who is the one based on qpid and proton, and propose to remove the
related functional tests.
The AMQP1 driver doesn't seems to be widely used.
[1] https://review.opendev.org/c/openstack/oslo.messaging/+/856643
Closes-Bug: 1992587
Change-Id: Id2ca9cd9ee8b8dbdd14dcd00ebd8188d20ea18dc
* Update oslo.messaging from branch 'master'
to ec1c99d562659f1ca246ecdd75e810c9ece0140d
- Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: If124c09bfa878585b89dee7578a97c12c42497f8
* Update oslo.messaging from branch 'master'
to 0602d1a10ac20c48fa35ad711355c79ee5b0ec77
- Increase ACK_REQUEUE_EVERY_SECONDS_MAX to exceed default kombu_reconnect_delay
Previously the two values were the same; this caused us
to always exceed the timeout limit ACK_REQUEUE_EVERY_SECONDS_MAX
which results in various code paths never being traversed
due to premature timeout exceptions.
Also apply min/max values to kombu_reconnect_delay so it doesn't
exceed ACK_REQUEUE_EVERY_SECONDS_MAX and break things again.
Closes-Bug: #1993149
Change-Id: I103d2aa79b4bd2c331810583aeca53e22ee27a49
* Update oslo.messaging from branch 'master'
to fd2381c723fe805b17aca1f80bfff4738fbe9628
- Disable greenthreads for RabbitDriver "listen" connections
When enabling heartbeat_in_pthread, we were restoring the "threading"
python library from eventlet to original one in RabbitDriver but we
forgot to do the same in AMQPDriverBase (RabbitDriver is subclass of
AMQPDriverBase).
We also need to use the original "queue" so that queues are not going to
use greenthreads as well.
Related-bug: #1961402
Related-bug: #1934937
Closes-bug: #2009138
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
Change-Id: I34ea0d1381e934297df2f793e0d2594ef8254f00
* Update oslo.messaging from branch 'master'
to 9b1e2dc48e83c225202955c8c7affe5e0bcf6d8b
- Update master for stable/2023.1
Add file to the reno documentation build to show release notes for
stable/2023.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.
Sem-Ver: feature
Change-Id: I80f227a59c36693c83bb94890536745610ba2393
* Update oslo.messaging from branch 'master'
to 115cfb5b7cff2a9803d64d02b98250b7b0fc09f0
- Fix typo in quorum-related variables for RabbitMQ
In [1] there was a typo made in variable names. To prevent even futher
awkwardness regarding variable naming, we fix typo and publish a
release note for ones that already using variables in their deployments.
[1] https://review.opendev.org/c/openstack/oslo.messaging/+/831058
Change-Id: Icc438397c11521f3e5e9721f85aba9095e0831c2
* Update oslo.messaging from branch 'master'
to 687dea2e65814606bece8041fe94fb2674d2590b
- Support overriding class for get_rpc_* helper functions
We currently do not support overriding the class being
instantiated in the RPC helper functions, this adds that
support so that projects that define their own classes
that inherit from oslo.messaging can use the helpers.
For example neutron utilizes code from neutron-lib that
has it's own RPCClient implementation that inherits from
oslo.messaging, in order for them to use for example
the get_rpc_client helper they need support to override
the class being returned. The alternative would be to
modify the internal _manual_load variable which seems
counter-productive to extending the API provided to
consumers.
Change-Id: Ie22f2ee47a4ca3f28a71272ee1ffdb88aaeb7758
* Update oslo.messaging from branch 'master'
to 7505316902d6469842b8c6f84d520ebd2314b7c7
- tox cleanups
'skip_basepython_conflicts' has been the cause of a couple of bugs in
tox 4 and there is talk of it going away. Remove it and fix up a few
other issues in the tox.ini file.
Change-Id: Ic19c896af2ab0cf3570c43e8ceb8cba64fb45cdd
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Update oslo.messaging from branch 'master'
to 9f710ce6cd955eaf6d7f9b474efa21df3d531be0
- Merge "Remove logging from ProducerConnection._produce_message"
- Remove logging from ProducerConnection._produce_message
In impl_kafka, _produce_message is run in a tpool.execute
context but it was also calling logging functions.
This could cause subsequent calls to logging functions to
deadlock.
This patch moves the logging calls out of the tpool.execute scope.
Change-Id: I81167eea0a6b1a43a88baa3bc383af684f4b1345
Closes-bug: #1981093
* Update oslo.messaging from branch 'master'
to bd73f14fd2b8fb7e5587888af126fc59867e4a36
- Merge "Warn when we force creating a non durable exchange"
- Warn when we force creating a non durable exchange
Adding warning logs so that users can detect the fallback with durable
exchanges.
Change-Id: Iabce0986fae6ed8838f1f94496b5994fc19cc5ef
* Update oslo.messaging from branch 'master'
to 2e81fac97344d1eacf4c56a1022f25256d52e7ab
- Merge "Implement get_rpc_client function"
- Implement get_rpc_client function
We already expose functions to handle the instantiation
of classes such as RPCServer and RPCTransport but the
same was never done for RPCClient so the API is
inconsistent in its enforcement.
This adds a get_rpc_client function that should be used
instead of instatiating the RPCClient class directly to
be more consistent.
This also allows to handle more logic inside the function
in the future such as if implementations for an async client
is implemented, as investigation in [1] has shown.
[1] https://review.opendev.org/c/openstack/oslo.messaging/+/858936
Change-Id: Ia4d1f0497b9e2728bde02f4ff05fdc175ddffe66
* Update oslo.messaging from branch 'master'
to b3c666ff34be908c85bdd3e6cd1a5fdf199333f0
- Merge "Force creating non durable control exchange when a precondition failed"
- Force creating non durable control exchange when a precondition failed
Precondition failed exception related to durable exchange
config may be triggered when a control exchange is shared
between services and when services try to create it with
configs that differ from each others. RabbitMQ will reject
the services that try to create it with a configuration
that differ from the one used first.
This kind of exception is not managed for now and services
can fails without handling this kind of issue.
These changes catch this kind exception to analyze if they
related to durable config. In this case we try to re-declare
the failing exchange/queue as non durable.
This problem can be easily reproduced by running a local RabbitMQ
server.
By setting the config below (sample.conf):
```
[DEFAULT]
transport_url = rabbit://localhost/
[OSLO_MESSAGING_RABBIT]
amqp_durable_queues = true
```
And by running our simulator twice:
```
$ tox -e venv -- python tools/simulator.py -d rpc-server -w 40
$ tox -e venv -- python tools/simulator.py --config-file ./sample.conf -d rpc-server -w 40
```
The first one will create a default non durable control exchange.
The second one will create the same default control exchange but as
durable.
Closes-Bug: #1953351
Change-Id: I27625b468c428cde6609730c8ab429c2c112d010