summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [stable-only] Cap virtualenv for py37stable/trainElod Illes2022-09-211-0/+4
| | | | | | | | | | | | | | | | | | | py37 test started to fail with latest virtualenv (20.16.4) as it bundles setuptools 65.3.0, which causes installation problems under py37. (Note: with py38 the problem does not occur). This patch sets virtualenv<20.16.4 to unblock the gate as virtualenv 20.16.3 bundles setuptools 63.4.1, with which py37 gate works well. Conflicts: tox.ini NOTE(elod.illes): conflict is caused by tox.ini cleanup patch, that was added in ussuri: I45981d5e80ab8ea03176ce08e119556fec078a37 Change-Id: I4c60766ea0daedf06023902a73b007c35f82de85 (cherry picked from commit ee7f2a8725094c3e88f6a10792bd34fb40b48276)
* fix strutils password regexHervé Beraud2022-03-153-0/+18
| | | | | | | | | | | | | | | | | | | Those regexes will fix Object style representation output. See the payload used in tests for details. This kind of output can be obtained by using the command: ``` $ openstack --debug ``` Co-Authored-By: Daniel Bengtsson <dbengt@redhat.com> Change-Id: I9024be93b109d1b64ca736546c0f69db7a5e06d0 (cherry picked from commit de4429f2be5fa21d1f6e1cacbb3c8417a7c56310) (cherry picked from commit 2c1b0628771695e546b0acb1e3c44c16c0c690db) (cherry picked from commit 90a504672071d61bdae3206c4764bd3528c165d6) (cherry picked from commit a38b56a6f9438d256d6e0f9b03181015f2b27d8c) (cherry picked from commit 1656a00d410374bb5a0e4df7e6f7b7ce3433c608) (cherry picked from commit 5c430356a660d88f1d5b16cb3f5d7d2ee89a9253)
* Fix regex used to mask passwordHervé Beraud2022-02-043-1/+35
| | | | | | | | | | | | | | | | | | Some use cases are poorly handled by the regex used to mask password. Indeed when the password contains quotes or double quotes in the middle such as `pass"word`, the mask_password method will return `***"word`. For more details please see https://bugs.launchpad.net/oslo.utils/+bug/1949623 Closes-Bug: #1949623 Change-Id: I941750b4d49d2d75f0831b24d6dd17f4040f70a2 (cherry picked from commit 6e17ae1f7959c64dfd20a5f67edf422e702426aa) (cherry picked from commit 5ce8a7f0f8ecec7a85a23ec3d7a7fb1cad14ceba) (cherry picked from commit 143d3fbfa1e04778884de5acc08fa6f7fdabb265) (cherry picked from commit 65aa4226d4bf286468da6df6759e364c1eb3e049) (cherry picked from commit 5e9dfa3408a6fac7e870a9b86ee774b5fd71a595)
* Dropping lower constraints testingHervé Beraud2022-01-313-54/+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. Contain also the patch[2] to remove the tox environment and the patch[3] to remove the lower-constraints.txt file. https://review.opendev.org/c/openstack/oslo.utils/+/787867 NOTE(damani): The lower-constraints.txt has been removed and about the .zuul.yaml need to adapt the jobs name. Conflicts: tox.ini lower-constraints.txt .zuul.yaml [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html [2] https://review.opendev.org/c/openstack/oslo.utils/+/772630 [3] https://review.opendev.org/c/openstack/oslo.utils/+/787867 Change-Id: Ia02154a1eb04434658a21adf82599ae55302e310 (cherry picked from commit 4cc3a558244769017ed5d8c3a6e4a63429d1e8e9) (cherry picked from commit c4e3576c63f8f12dc1b2c3ff9bf0350042cd1703) (cherry picked from commit 125617dcb444739eb19e2d4f3372b65fa49e926a) (cherry picked from commit 03ed19655230005ce69faefef993f6fa17773f18)
* Release greenthread when computing checksumtrain-em3.41.6Vladyslav Drok2020-06-102-0/+22
| | | | | | | | | | Having time.sleep(0) after reading each block of data for computing checksum will allow other greenthreads to run. Closes-Bug: 1882569 Change-Id: I6e547d206de9e3e333e29ccad52bf6b519a86ff9 (cherry picked from commit b9938230f992935e8332b6e288937be890724cd2) (cherry picked from commit eeb7b1010720c47511d8b1abb94260357b0bea3f)
* tox: Use upper-constraints for docs jobscaoyuan2020-04-221-4/+7
| | | | | | | | | | | | | Conflicts: tox.ini Note(elod.illes): conflict is due to multiple python 2 removal and tox.ini restructuring patches which are not needed to be backported to Train. Upper constraint file link set to point to Train version of the file. Change-Id: I43225fc4ed3ba471ba7097f1e317bc6ffa777a46 (cherry picked from commit 8433aba4d6b5925fa8fb223d51a816ff541f1f2f)
* Fix regex to correctly recognize scientific notation with QemuImgInfo3.41.5Hervé Beraud2020-02-263-1/+11
| | | | | | | | | | | | | | | | | | | | qemu 4.1.0 output shifts to scientific notation at 1000mb, breaking oslo.utils. Problem here is that the qemu-img output shifts to scientific notation: 999 => 999 MiB 1000 => 1e+03 MiB The regex in python-oslo-utils does not cover this. This issue is likely regexp parsing "disk size: 1e+03 MiB" value. These changes fix that. Change-Id: I4c016865890135023ceb497de18d75ccebd5961a Closes-Bug: 1864529 (cherry picked from commit ebf8368501500767fd4e6e13602bb88950a4484b)
* Verify the sanitize keys are lowered3.41.4Dougal Matthews2019-11-222-3/+9
| | | | | | | | This change is preventative to ensure any keys added in the future are all lowercase. Change-Id: Ib843fe59a80b081d9d0193717ff5a980e22c81b0 (cherry picked from commit 577da7f00b36f23a95c0fa9beb6c4c702ad82f92)
* Make mask_dict_password case insensitive and add new patternsDougal Matthews2019-11-183-5/+31
| | | | | | | | | | | | | | In Icc19b7c8bdb6a3182939d5e9fdef21288b19f43d mask_password was made case insensitive but mask_dict_password wasn't. This update makes the behaviour of these functions the same. Instead of lowering _SANITIZE_KEYS each time the source list is lowered. New password patterns from realworld logs were added to the patterns. Change-Id: Ic3ee301857630a15b9c26fd5d0fc907c43199517 Related-Bug: #1850843 (cherry picked from commit ed70bd3cd10eae2a34a5e9bd5d1fe0a6791ab3de)
* Make mask_password case insensitive, and add new patterns3.41.3Cédric Jeanneret2019-11-053-14/+64
| | | | | | | | | | | | It appears that Mistral service logs everything, and doesn't use yet the mask_password (nor mask_dict_password) method. In order to ensure all is properly masked, we have to add some new patterns, and make it case insensitive in order to simplify and avoid duplicated entries. Change-Id: Icc19b7c8bdb6a3182939d5e9fdef21288b19f43d Related-Bug: #1850843 Signed-off-by: Cédric Jeanneret <cjeanner@redhat.com> (cherry picked from commit b41268417cecb12d1d5955ee3107067edf050221)
* Support "qemu-img info" virtual size in QEMU 4.1 and later3.41.2Mark Mielke2019-10-032-2/+17
| | | | | | | | | | | | | | | | | | | QEMU 4.0 and earlier have output like: virtual size: 1.5M (1572864 bytes) QEMU 4.1 and later have output like: virtual size: 1.5 MiB (1572864 bytes) Adjust the regular expression to allow for optional whitespace between the magnitude and the unit. Adjust the unit parsing to support the expanded "MiB" form. Change-Id: I1f316d6982c0def3296af4835484ad2d81a87fd4 Closes-Bug: 1844050 (cherry picked from commit 5204dfcd6c5a8f75bb1fe3dc348cec82a6284eff)
* Update TOX/UPPER_CONSTRAINTS_FILE for stable/trainOpenStack Release Bot2019-09-201-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/train branch, tests will continue to use the upper-constraints list on master. Change-Id: Ib159babc25c53482563d30f694a4a10e7e9abd73
* Update .gitreview for stable/trainOpenStack Release Bot2019-09-201-1/+2
| | | | Change-Id: I6ffd824dd40c074824e49534f83c5fc8fa5e8531
* Add digestmod when using hmac3.41.1Alfredo Moralejo2019-08-211-1/+3
| | | | | | | | | | | | | Until Python 3.8 hmc.new() defaulted the digestmod argument to 'hmac-md5'. This was deperecated, to be removed in Python 3.8 [1], so let's get ready for new python. Also switching to more secure sha1 algorithm, using md5 anywhere may trigger alerts from automatic security tools. [1] https://docs.python.org/3.8/library/hmac.html Change-Id: I4b365cb05de98bdd498b3c2094e4a77ab3944b12
* Add Python 3 Train unit testsCorey Bryant2019-07-053-3/+3
| | | | | | | | | | | | This is a mechanically generated patch to ensure unit testing is in place for all of the Tested Runtimes for Train. See the Train python3-updates goal document for details: https://governance.openstack.org/tc/goals/train/python3-updates.html Change-Id: Iaf3ca4799bb9e78b180bbfdab26f57d88781bd42 Story: #2005924 Task: #34234
* Cap Bandit below 1.6.0 and update Sphinx requirementBen Nemec2019-05-152-2/+3
| | | | | | | | | | | | Bandit 1.6.0 accidentally changed how the exclusion list option is handled and breaks our use of it. Cap to the previous version until Bandit has fixed the problem. Sphinx 2.0 no longer works on python 2.7, so we need to start capping it there as well. Change-Id: I719a8cff50dcc0dea62db14edf7b9ab35b72facd Reference: https://github.com/PyCQA/bandit/pull/489
* Merge "Replace git.openstack.org URLs with opendev.org URLs"Zuul2019-05-032-2/+2
|\
| * Replace git.openstack.org URLs with opendev.org URLsjacky062019-04-232-2/+2
| | | | | | | | | | | | | | Thorough replacement of git.openstack.org URLs with their opendev.org counterparts. Change-Id: I90c0338f37fb6c8ed3b555b2d9d6b76aff6dad76 Closes-Bug: #1825935
* | Merge "Dropping the py35 testing"Zuul2019-05-033-3/+2
|\ \ | |/ |/|
| * Dropping the py35 testingGhanshyam Mann2019-04-153-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the integration testing has been moved to Bionic now[1] and py3.5 is not tested runtime for Train or stable/stein[2]. As per below ML thread, we are good to drop the py35 testing now: http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html [1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html [2] https://governance.openstack.org/tc/reference/runtimes/stein.html https://governance.openstack.org/tc/reference/runtimes/train.html Change-Id: I431a9623991dfad180f0654891b930b547df2689
* | OpenDev Migration Patch3.41.0OpenDev Sysadmins2019-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge "eventletutils: Optimise EventletEvent.clear()"Zuul2019-04-162-7/+27
|\ \ | |/ |/|
| * eventletutils: Optimise EventletEvent.clear()Zane Bitter2019-01-252-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When EventletEvent.clear() is called twice in succession without an intervening set(), there's no need to replace the underlying eventlet.event.Event object, since it has never been sent. Doing so would have woken other greenthreads waiting on the event to no particular end. When clear() is called after the event has been set(), we already did not do anything special with the existing eventlet.event.Event as we cannot call send() on it twice. We simply replace it with a new one; the code in wait() will handle the situation correctly, since it will wake up (due to the initial event having been sent) and begin waiting on the new eventlet.event.Event instead. This is consistent with the observed behaviour of threading.Event. A new unit test verifies this. Change-Id: Ibd5324926431fc760c3dd0be064324e3009cc2c2
* | Merge "Mask encryption_key_id"Zuul2019-03-272-1/+5
|\ \
| * | Mask encryption_key_idyenai2019-02-022-1/+5
| |/ | | | | | | | | Change-Id: I9e684cd8bab85728ff0117f95a30eb7dbb5bf51c Closes-Bug: #1814365
* | Update master for stable/steinOpenStack Release Bot2019-03-182-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Add file to the reno documentation build to show release notes for stable/stein. Use pbr instruction to increment the minor version number automatically so that master versions are higher than the versions on stable/stein. Change-Id: I1794009c46abeabcc6a8b21e0802f9b42cb29bcc Sem-Ver: feature
* | add python 3.7 unit test job3.40.3ZhongShengping2019-02-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a mechanically generated patch to add a unit test job running under Python 3.7. See ML discussion here [1] for context. [1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html Story: #2004073 Task: #27440 Change-Id: I856881d9a710e01ed171d25c8d2dbf97eb7ed7b3
* | Update hacking versionZhijunWei2019-02-135-8/+9
|/ | | | | | | Use latest release 1.1.0 and compatible changes w.r.t pep8 Change-Id: Ide3a556918f341de6eafecb36ca431da40a0aed0 Closes-Bug: #1815715
* Avoid double-setting event3.40.2Ben Nemec2019-01-232-1/+13
| | | | | | | | | | | | | | | | In commit cc8b51e1e16f6bdc7d6c0e571e2002e70cde098d we added a send on the old event when clearing an EventletEvent. However, this was done unconditionally, which means if the event was already sent then we attempt to send it again. This fails with: AssertionError: Trying to re-send() an already-triggered event. Similar to 14a53c4d8a9d5605b14a503803859df0d6d4b820, we should check if self._set is True and if so then we know that the event was already sent and we don't need to do it again. Change-Id: I660601383072d11e4a077aada8c1b8c30b9d8d1d Closes-Bug: 1812922
* Merge "Avoid calling eventlet.event.Event.reset()"3.40.1Zuul2019-01-182-9/+6
|\
| * Avoid calling eventlet.event.Event.reset()Zane Bitter2019-01-032-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The eventlet maintainers have made it clear that calling reset() on an Event is not recommended: https://github.com/eventlet/eventlet/commit/715b2ced5239bbada84c06f488b9c8dda8180230 We don't really need to resend the event to wake up threads, because Event.wait() will return immediately once the event has been sent. So just rely on the internal _set flag to tell us whether we need to send the event. Change-Id: I466aa7cb64308e018598c3bb63a9d0cfbc833adc
* | Merge "Support non-dict mappings in mask_dict_password"3.40.0Zuul2019-01-082-3/+45
|\ \
| * | Support non-dict mappings in mask_dict_passwordBen Nemec2018-12-032-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mask_dict_password doesn't actually have a dependency on the dict type specifically. It can work on any subclass of collections.Mapping. This changes the isinstance check to reflect that and adds a unit test using a collections.Mapping subclass. Change-Id: I28781acf027b9b34f8274196db5dd4d2a9adc9ba Closes-Bug: 1804528
* | | Merge "Fix race condition in eventletutils Event"3.39.1Zuul2019-01-074-3/+67
|\ \ \ | | |/ | |/|
| * | Fix race condition in eventletutils EventZane Bitter2018-12-054-3/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The threading-compatible eventlet Event class has a race condition on the wait method. If greenthread A is blocked on the wait, but another greenthread B calls clear() and then set(), B calls self._event.send(), but A is waiting on a different eventlet Event which is no longer used by the oslo.service Event... To resolve this, when clearing an Event trigger the underlying eventlet Event immediately, then have the wait() method resume waiting on the new eventlet Event. Change-Id: I81579e2977bb965a5398a2cb4e3e24f5671e856a Co-Authored-By: Victor Stinner <vstinner@redhat.com> Co-Authored-By: Hervé Beraud <hberaud@redhat.com> Closes-Bug: #1805706
* | | Use template for lower-constraintsAndreas Jaeger2018-12-201-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Small cleanups: * Use openstack-lower-constraints-jobs template, remove individual jobs. * Sort list of templates Change-Id: I3c1f03ef0cf2ee912db0b81005353e822e7ba4d2 Needed-By: https://review.openstack.org/623229
* | | Merge "Don't use monotonic on Python >=3.3"3.39.0Zuul2018-12-132-2/+6
|\ \ \ | |/ /
| * | Don't use monotonic on Python >=3.3Zane Bitter2018-12-052-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A change to the global-requirements[1] has limited use of the monotonic library to Python versions earlier than 3.3 (later versions have built-in support for a monotonic clock), so no requirements changes can be merged until we similarly limit it in requirements.txt. [1] https://review.openstack.org/615441 Change-Id: Ib53d89ea820d21114d10280c9f4ab1b0c2c4a4bc
* | | Update mailinglist from dev to discussZhongShengping2018-12-051-1/+1
|/ / | | | | | | | | | | | | openstack-dev was decomissioned this night in https://review.openstack.org/621258 Update openstack-dev to openstack-discuss Change-Id: I815cf3290b137940cbe9811bb5b5a59739425f01
* | Expose eventlet Event wrapper class3.38.0Ben Nemec2018-11-012-3/+4
|/ | | | | | | | | | | | | | | We have a need to use the eventlet Event class directly in oslo.service. Currently it is copy-pasted from this project, but we now have a duplicate bug due to that so let's just expose it so one copy can be used in both places. This should be safe as the class implements a stdlib interface so we can't really alter the API, and it's not really private since instances of it are returned to users. Change-Id: If8e7a41f9fe5573a780f9faabdbaf1326631d37a Related-Change: https://review.openstack.org/558879 Related-Bug: 1800879
* Clean up .gitignore references to personal toolsZhongShengping2018-10-151-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | Developers run all sorts of different tools within Git repositories, any of which can leave their own special trashfiles all over the place. We can't every hope to catalog them all, so better to recommend developers simply configure a global core.excludesfile to filter the irrelevant files which tend to get created by their personal choice of tools. To this end, remove the long-standing sections for "Mr Developer" and "Editors" since their mere existence here sends the signal that we welcome (and have time to review) additions for any old tool someone ever might happen to try. Also add a comment block explaining this, for clarity. We can, and should of course, continue to list files created by the tools recommended by our workflow (test frameworks called from tox, documentation and packaging builds, et cetera). This change is a port of I1b41efac219fca44e2548fc36633724d0ecfc0cb from the openstack-dev/oslo-cookiecutter repository. Change-Id: I09a564e59c4515a67698d5c15df1d1b3d77bbc38
* Fix exception raise at rpdb session3.37.1BubaVV2018-09-071-2/+2
| | | | | | | | Some components raise unrelated exceptions during rpdb session due to unaware attribute handling of file-like objects Change-Id: I04dd5a7d0f6ec2920671dfa612439427dffefd52 Closes-bug: #1791104
* Merge "Fix docstring formatting nit in uuidsentinel"3.37.0Zuul2018-08-281-1/+1
|\
| * Fix docstring formatting nit in uuidsentinelBen Nemec2018-08-281-1/+1
| | | | | | | | | | | | | | | | This doesn't actually appear in the docs because it's a private class, but if we ever made it public we want it to format the code block correctly. Change-Id: Ia79b58d6d7847b65f946763c82a25ce8d8e581fb
* | Merge "UUID sentinel"Zuul2018-08-282-0/+62
|\ \ | |/
| * UUID sentinelEric Fried2018-08-282-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a private _UUIDSentinels() class to oslo_utils.fixture that behaves like a mock.sentinel, but returns specifically UUIDs. Expose a (singleton) instance of it called uuidsentinel. This is mostly copied from [1], with the following differences: - We don't do the enforced-singleton thing [2]. But importing the uuidsentinel global yields the same behavior. - We don't do the local import thing [3][4], because we're already in the right lib, so no issues with circular imports. - Locking is added to make this threadsafe. (See discussion at [5]) Note that there is some question as to whether it is more appropriate for this to live here or in oslotest [6]. This has been discussed on the dev ML [7] and it was concluded [8] that it should live here. [1] https://github.com/openstack/nova/blob/722d5b477219f0a2435a9f4ad4d54c61b83219f1/nova/tests/uuidsentinel.py [2] https://github.com/openstack/nova/blob/722d5b477219f0a2435a9f4ad4d54c61b83219f1/nova/tests/uuidsentinel.py#L30 [3] https://github.com/openstack/nova/blob/722d5b477219f0a2435a9f4ad4d54c61b83219f1/nova/tests/uuidsentinel.py#L18-L19 [4] https://github.com/openstack/nova/blob/722d5b477219f0a2435a9f4ad4d54c61b83219f1/nova/tests/uuidsentinel.py#L26 [5] http://eavesdrop.openstack.org/irclogs/%23openstack-oslo/%23openstack-oslo.2018-08-20.log.html#t2018-08-20T20:10:33 [6] https://review.openstack.org/#/c/594068/ [7] http://lists.openstack.org/pipermail/openstack-dev/2018-August/133670.html [8] http://lists.openstack.org/pipermail/openstack-dev/2018-August/133861.html Change-Id: I214ff21b461fa1ca4b83476e1d0a763efe986217
* | Merge "add lib-forward-testing-python3 test job"Zuul2018-08-271-0/+1
|\ \
| * | add lib-forward-testing-python3 test jobDoug Hellmann2018-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a mechanically generated patch to add a functional test job running under Python 3 as part of the python3-first goal. See the python3-first goal document for details: https://governance.openstack.org/tc/goals/stein/python3-first.html Change-Id: I3b1472739b25ebcdd8ffbab048c611315b8f108e Story: #2002586 Task: #24322
* | | Merge "add python 3.6 unit test job"Zuul2018-08-251-0/+1
|\ \ \ | |/ /
| * | add python 3.6 unit test jobDoug Hellmann2018-08-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a mechanically generated patch to add a unit test job running under Python 3.6 as part of the python3-first goal. See the python3-first goal document for details: https://governance.openstack.org/tc/goals/stein/python3-first.html Change-Id: If22b90e0b5b1b289a7657ecd5adb8f2f11401f0a Story: #2002586 Task: #24322