summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [rabbit] use retry parameters during notification sendingwallaby-em12.7.3stable/wallabyBalazs Gibizer2022-02-118-26/+60
| | | | | | | | | | | | | | | The rabbit backend now applies the [oslo_messaging_notifications]retry, [oslo_messaging_rabbit]rabbit_retry_interval, rabbit_retry_backoff and rabbit_interval_max configuration parameters when tries to establish the connection to the message bus during notification sending. This patch also clarifies the differences between the behavior of the kafka and the rabbit drivers in this regard. Closes-Bug: #1917645 Change-Id: Id4ccafc95314c86ae918336e42cca64a6acd4d94 (cherry picked from commit 7b3968d9b012e873a9b393fcefa578c46fca18c6) (cherry picked from commit 3b5a0543e97619ca8f8cf98193f6b6375d77cbf2)
* Reproduce bug 1917645Balazs Gibizer2022-02-111-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | The [oslo_messaging_notification]retry parameter is not applied during connecting to the message bus. But the documentation implies it should[1][2]. The two possible drivers, rabbit and kafka, behaves differently. 1) The rabbit driver will retry the connection forever, blocking the caller process. 2) The kafka driver also ignores the retry configuration but the notifier call returns immediately even if the notification is not (cannot) be delivered. This patch adds test cases to show the wrong behavior. [1] https://docs.openstack.org/oslo.messaging/latest/configuration/opts.html#oslo_messaging_notifications.retry [2] https://github.com/openstack/oslo.messaging/blob/feb72de7b81e3919dedc697f9fb5484a92f85ad8/oslo_messaging/notify/messaging.py#L31-L36 Related-Bug: #1917645 Change-Id: Id8557050157aecd3abd75c9114d3fcaecdfc5dc9 (cherry picked from commit 1db6de63a86812742cbc37a0f5fe1fd7a095dd7f) (cherry picked from commit 7390034e479c044d9067d97cd801f9f58c813e41)
* Update TOX_CONSTRAINTS_FILE for stable/wallaby12.7.2OpenStack Release Bot2021-04-151-1/+1
| | | | | | | | | | | | Update the URL to the upper-constraints file to point to the redirect rule on releases.openstack.org so that anyone working on this branch will switch to the correct upper-constraints list automatically when the requirements repository branches. Until the requirements repository has as stable/wallaby branch, tests will continue to use the upper-constraints list on master. Change-Id: I2fce79689ae625184566fd980b9ab2c1de5ed379
* Update .gitreview for stable/wallabyOpenStack Release Bot2021-04-151-0/+1
| | | | Change-Id: I9c069d3d4c020e63deb6b10bcea424de8b133606
* Move flake8 as a pre-commit local target.Kenneth Giusti2021-04-151-2/+6
| | | | | | | | | | | | | | | | | | The goal here is to avoid conflicts between flake8 and hacking version each 2 days. Inspired from nova's approach[1]. The flake8 version to install will be determined by hacking and requirements[2] will stay aligned instead of relying on different versions. [1] https://opendev.org/openstack/nova/src/branch/master/.pre-commit-config.yaml#L26-L35 [2] https://opendev.org/openstack/hacking/src/branch/master/requirements.txt#L1 Co-authored-by: Daniel Bengtsson <dbengt@redhat.com> Change-Id: I3d2e95c783cb0ca88ea8657acd9f262ea9244e9d (cherry picked from commit f43a70687cf9e4704612780f2e8d026661d2aae1)
* Merge "Correctly handle missing RabbitMQ queues"12.7.1Zuul2021-02-094-21/+58
|\
| * Correctly handle missing RabbitMQ queuesHervé Beraud2021-02-044-21/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, setting the '[oslo_messaging] direct_mandatory_flag' config option to 'True' (the default) will result in a 'MessageUndeliverable' exception being raised when sending a reply if a RabbitMQ queue is missing [1]. It was the responsibility of the application to handle this exception, however, many applications are not doing so. This has resulted in a number of bug reports. Start handling this error condition, using a retry loop to attempt to resend the message and work around any temporary glitches. Since attempting to send a reply will will no longer raise an exception, there is little benefit in retaining the '[oslo_messaging] direct_mandatory_flag' config option: users setting this to False will simply not benefit from the retry logic and improved logging added here. This option is already deprecated though and will be fully removed in a future release. [1] https://www.rabbitmq.com/channels.html Change-Id: Id5cddbefbe24ef100f1cc522f44430df77d217cb Closes-Bug: #1905965
* | Merge "Move jobs to py38"Zuul2021-02-032-25/+21
|\ \
| * | Move jobs to py38Hervé Beraud2020-12-162-25/+21
| | | | | | | | | | | | Change-Id: I5e7e3f84519770e39754338ea4968fa6cd3ee6f6
* | | Merge "remove unicode from code"Zuul2021-02-034-15/+15
|\ \ \
| * | | remove unicode from codexuanyandong2021-01-034-15/+15
| | | | | | | | | | | | | | | | Change-Id: Ib2b816728307166450a4cea2ccdb3c4b550a0713
* | | | Merge "Remove six"Zuul2021-02-031-1/+0
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | Remove sixxuanyandong2021-01-021-1/+0
| |/ | | | | | | Change-Id: I9ac8671d9a37c218cb0e5546eb6dbcec7a7a764e
* | Merge "Deprecate the mandatory flag"12.7.0Zuul2021-02-012-3/+12
|\ \
| * | Deprecate the mandatory flagHervé Beraud2021-02-012-3/+12
| | | | | | | | | | | | | | | | | | It will not be possible to deactivate this functionality anymore. Change-Id: I1cbafff03349f7da9224de46285707fbf2a81a68
* | | Merge "Use py3 as the default runtime for tox"Zuul2021-01-181-1/+1
|\ \ \
| * | | Use py3 as the default runtime for toxHervé Beraud2020-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving on py3 as the default runtime for tox to avoid to update this at each new cycle. Wallaby support officially the following runtimes [1]: - Python 3.6 - Python 3.8 During Victoria Python 3.7 was used as the default runtime [2] however this version isn't longer officially supported. [1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby [2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria Change-Id: I2c517401aa1ae464e6563800ecb0a459076655b3
* | | | Merge "fix variable name"12.6.1Zuul2021-01-081-3/+3
|\ \ \ \
| * | | | fix variable nameHervé Beraud2020-12-111-3/+3
| | |_|/ | |/| | | | | | | | | | Change-Id: I6039d09533c86d651b5c63b500058aac3c9f0a7f
* | | | Merge "Use TOX_CONSTRAINTS_FILE"Zuul2021-01-081-1/+1
|\ \ \ \ | |_|_|/ |/| | |
| * | | Use TOX_CONSTRAINTS_FILEHervé Beraud2020-11-041-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | UPPER_CONSTRAINTS_FILE is old name and deprecated This allows to use upper-constraints file as more readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>. [1] https://review.opendev.org/#/c/722814/ [2] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file Change-Id: I93bab5b1e77e720cbf308a97a9605a9dc98025a0
* | | Merge "Fix type of direct_mandatory_flag opt"Zuul2021-01-061-6/+6
|\ \ \
| * | | Fix type of direct_mandatory_flag optBen Nemec2020-12-221-6/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An IntOpt with a default of True is invalid. I'm a little surprised this doesn't fail a defaults check somewhere, but it needs to be fixed regardless. Looking at where it is used, it appears the boolean type is correct. This just changes the opt type to BoolOpt to match. Change-Id: I01a38754a31c891f2b3b9c7f8135690693df5d13 Closes-Bug: 1909036
* | | Dropping lower constraints testingHervé Beraud2020-12-181-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | We facing errors related to the new pip resolver, this topic was discussed on the ML and QA team proposed to to test lower-constraints [1]. I propose to drop this test because the complexity and recurring pain needed to maintain that now exceeds the benefits provided by this mechanismes. [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html Change-Id: Icf48ef72fbfff88dda2714b386dbbfe355dc1acb
* | Fix doc title renderingHervé Beraud2020-12-041-2/+2
|/ | | | Change-Id: I9532f28a84b206c6268ead94c574aacb6216df6a
* Python 3.9: isAlive is removed12.6.0Thomas Goirand2020-10-163-31/+31
| | | | | | | | | | The Threading method isAlive was deprecated a long time ago, in the favor of is_alive(). Though in Python 3.9, isAlive is removed. We must switch to it. Note that is_alive() is available at least in Python 3.5 (I tried) and probably even earlier, so switching to is_alive() is not a problem for the Python interpreter versions currently supported by OpenStack. Change-Id: I9d671abcd2cea9c0c726edaddcd65e1093d96731
* Merge "Run rabbitmq heartbeat in python thread by default"Zuul2020-10-152-7/+19
|\
| * Run rabbitmq heartbeat in python thread by defaultHervé Beraud2020-08-272-7/+19
| | | | | | | | | | | | | | | | | | | | Removing the experimental nature of this feature and activating it by default. Now to run heartbeat in a green thread users should set this option to False. Also deprecating this option to prepare future removal and force to always run heartbeat in a python thread whatever the context. Change-Id: I32a6c4ad0a456282ec02b5e4c8309489b3c17553
* | add min of 1 to rpc_conn_pool_sizeSean Mooney2020-10-133-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | This change add a min value of 1 to [oslo_messaging_rabbit]/rpc_conn_pool_size such that there is always at least 1 connection avaiable. This change add a runtime check to ensure that [oslo_messaging_rabbit]/rpc_conn_pool_size is greater than or equal too [oslo_messaging_rabbit]/conn_pool_min_size Change-Id: I2ad4b9f1d012c9f0586a932ac27d96da1bcc4e4c Closes-Bug: #1899533
* | Adding pre-commitHervé Beraud2020-09-2212-18/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced changes: - pre-commit config and rules - Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks. - Applying fixes for pre-commit compliance in all code. Also commit hash will be used instead of version tags in pre-commit to prevend arbitrary code from running in developer's machines. pre-commit will be used to: - trailing whitespace; - Replaces or checks mixed line ending (mixed-line-ending); - Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker); - Checks that non-binary executables have a proper shebang (check-executables-have-shebangs); - Check for files that contain merge conflict strings (check-merge-conflict); - Check for debugger imports and py37+ breakpoint() calls in python source (debug-statements); - Attempts to load all yaml files to verify syntax (check-yaml); - Run flake8 checks (flake8) (local) For further details about tests please refer to: https://github.com/pre-commit/pre-commit-hooks Change-Id: Ibd0c3d64fdc5c293d9d676d33eab828d9fde971f Co-authored-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
* | Add Python3 wallaby unit testsOpenStack Release Bot2020-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is an automatically generated patch to ensure unit testing is in place for all the of the tested runtimes for wallaby. See also the PTI in governance [1]. [1]: https://governance.openstack.org/tc/reference/project-testing-interface.html Change-Id: I156ddad2cf69663d24bdcb6500386a33aab72a31
* | Update master for stable/victoriaOpenStack Release Bot2020-09-112-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Add file to the reno documentation build to show release notes for stable/victoria. Use pbr instruction to increment the minor version number automatically so that master versions are higher than the versions on stable/victoria. Change-Id: I0e5758da8c95474b1ddda5419f80ae94da71d147 Sem-Ver: feature
* | Merge "[goal] Migrate testing to ubuntu focal"12.5.0Zuul2020-09-114-13/+13
|\ \
| * | [goal] Migrate testing to ubuntu focalGhanshyam Mann2020-09-104-13/+13
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per victoria cycle testing runtime and community goal[1] we need to migrate upstream CI/CD to Ubuntu Focal(20.04). Fixing: - bug#1886298 Bump the lower constraints for required deps which added python3.8 support in their later version. Story: #2007865 Task: #40207 Closes-Bug: #1886298 [1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.h> Change-Id: Id6b499239fa8b6480c5f67d460215ab458677c6d
* | Merge "Add a ping endpoint to RPC dispatcher"12.4.0Zuul2020-08-285-0/+81
|\ \ | |/ |/|
| * Add a ping endpoint to RPC dispatcherArnaud Morin2020-08-185-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this patch is to add an endpoint directly in RPC dispatcher, so this endpoint will always be available, in a cross project manner, without the need for projects to manage it by themself. This endpoint stay disabled by default, so this change is harmless without a specific configuration option. To enable this ping endpoint, an operator will just have to add a new parameter in the [DEFAULT] section, alongside with rpc_response_timeout [DEFAULT] rpc_ping_enabled=true # default is false The purpose of this new endpoint is to help operators do a RPC call (a ping) toward a specific RPC callback (e.g. a nova-compute, or a neutron-agent). This is helping a lot for monitoring agents (for example, if agents are deployed in a kubernetes pod). The endpoint is named oslo_rpc_server_ping. Change-Id: I51cf67e060f240e6eb82260e70a057fe599f9063 Signed-off-by: Arnaud Morin <arnaud.morin@corp.ovh.com>
* | Merge "Cancel consumer if queue down"12.3.0Zuul2020-08-013-31/+65
|\ \
| * | Cancel consumer if queue downshenjiatong2020-07-313-31/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we have switched to use default exchanges to avoid excessive amounts of exchange not found messages. But it does not actually solve the problem because reply_* queue is already gone and agent will not receive callbacks. after some debugging, I found under some circumstances seems rabbitmq consumer does not receive basic cancel signal when queue is already gone. This might due to rabbitmq try to restart consumer when queue is down (for example when split brain). In such cases, it might be better to fail early. by reading the code, seems like x-cancel-on-ha-failover is not dedicated to mirror queues only, https://github.com/rabbitmq/rabbitmq-server/blob/master/src/rabbit_channel.erl#L1894, https://github.com/rabbitmq/rabbitmq-server/blob/master/src/rabbit_channel.erl#L1926. By failing early, in my own test setup, I could solve a certain case of exchange not found problem. Change-Id: I2ae53340783e4044dab58035bc0992dc08145b53 Related-bug: #1789177
* | | Merge "Bump bandit version"Zuul2020-07-282-3/+8
|\ \ \
| * | | Bump bandit versionMoisés Guimarães de Medeiros2020-07-252-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch bumps bandit allowed version to >=1.6.0,<1.7.0 in order to avoid the errors detailed here https://github.com/PyCQA/bandit/pull/393 Change-Id: I9235560667f664643007b8ca0be1707eab4126ad Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
* | | | Merge "Catch ConnectionForced Exception"Zuul2020-07-281-1/+3
|\ \ \ \ | |/ / / |/| | |
| * | | Catch ConnectionForced Exceptionshenjiatong2020-07-191-1/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Occasionally I saw large number of connectionforced exceptions. such exceptions cannot be healed automatically and requires a reboot. catch it and ensure connection established. Change-Id: I5c468d10230f05438df780e045f1e92662edf070 Closes-Bug: #1883038
* | | Move legacy grenade jobs to Zuul v312.2.2Kenneth Giusti2020-07-208-393/+6
| | | | | | | | | | | | | | | | | | | | | Also deletes obsolete playbook files for telemetry tests that have been removed. Change-Id: Ibbb811e988cc048e6c39a0c2336c716a1a0ddb30
* | | Merge "Drop a python 2 exception management"Zuul2020-07-171-8/+1
|\ \ \
| * | | Drop a python 2 exception managementHervé Beraud2020-06-181-8/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously (when python 2 was supported) we introduced some specific exception management to detect connections issues when a rabbitmq cluster node disappearing. The original issue was that a ConnectionRefusedError is thrown and not managed by oslo.messaging to detect heartbeat issue and call ensure_connection for switching the connection destination (cluster node). `ConnectionRefusedError` is only a python 3 exception [2]. Now that we only support python 3 we don't need to continue to wrap/emulate this kind of exceptions (ConnectionRefusedError) [2] and so we can drop the python 2 compatibility code to only support python 3 code. [1] https://github.com/openstack/oslo.messaging/commit/9d8b1430e5c081b081c0e3c0b5f12f744dc7809d [2] https://docs.python.org/3/library/exceptions.html#ConnectionRefusedError Change-Id: I4c459d8c947dac213a1866c0d37e8f3d547aa82e
* | | tests: Resolves issues with kombu > 4.6.812.2.1Stephen Finucane2020-07-021-6/+9
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | The 'kombu.connection.Connection.ensure_connection' method has changed from calling 'retry_over_time' on 'self.connect' to calling it on 'self._connection_factory' [1], meaning our mocks are outdated. Address this change. [1] https://github.com/celery/kombu/pull/1193/commits/398aa5b8cd1fe1fc Change-Id: Ibbcf21a57ab1e3f90c21901296e5c088b645127c Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Closes-Bug: #1885923
* | Simplify tools/test-setup.shAndreas Jaeger2020-07-014-39/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test-setup.sh is called after bindep is run in CI, and tox is not setup. Simplify the script so that it only does what's needed - install qdrouterd for Ubuntu from qpid/testing. Install the other packages using bindep, add test to amqp1 profile. Add amqp1 to bindep_profiles where needed for scenario tests, previously test-setup.sh added it everywhere. Some tests are skipped due to changes in recent versions of kombu. These will be unskipped when we come up with a proper fix. Change-Id: Ic3a9e2c873619670edfbf71022d593f3cb5f70f2 Related-Bug: #1885923
* | Merge "Align contributing doc with oslo's policy"Zuul2020-06-301-0/+5
|\ \ | |/ |/|
| * Align contributing doc with oslo's policyHervé Beraud2020-05-041-0/+5
| | | | | | | | | | | | | | | | Related to: - https://review.opendev.org/#/c/723044/ - https://governance.openstack.org/tc/goals/selected/ussuri/project-ptl-and-contrib-docs.html Change-Id: I006d5ca0f9ae492dcd53b1d8799ac3e375bf9127
* | Fix pygments stylemelissaml2020-06-041-1/+1
| | | | | | | | | | | | | | | | New theme of docs respects pygments_style. more info: http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html Change-Id: I287fd718f9283e5d7d6951b9e55d5a6b48e07e3c