Hi, There is a series of patches to remove eventlet from Swift proposed: https://review.opendev.org/q/project:openstack/swift+topic:eventlet-removal+... With these patches applied, Swift runs using Gunicorn as the WSGI server and uses threading (if eventlet is not installed or is disabled using the environment variable USE_EVENTLET=0). Eventlet modules have been mostly replaced by modules from Python's standard library. The current testing status is as follows: Functional: 100% passing Unit: 99% passing Probe: ~97% passing (some tests are flaky, which might be unrelated; 3% are logline mismatches in test/probe/test_signals.py) If you want to start testing without deploying a Swift cluster, the simplest way is to check out the feature/threaded branch, create a virtualenv and run unittests and/or in-process functional tests. For example: git clone -b feature/threaded https://github.com/cschwede/swift.git # Copy of the proposed patches cd swift virtualenv .venv312 -p python3.12 source .venv312/bin/activate pip install -r requirements.txt pip install -r test-requirements.txt pip uninstall -y eventlet To run in-process functional tests: SWIFT_TEST_IN_PROCESS=1 ./.functests Unit tests can be run with ./.unittests; however, due to the still large amount of failures (~95 out of 10.000+ tests still failing) pytest might crash with a MemoryError. I do run these tests per directory for the moment, eg: ./.unittests obj ./.unittests proxy If you want to test an actual Swift deployment without eventlet (and run probetests), I recommend using a Swift-All-In-One (SAIO) deployment, as documented in [1]. If using [2] you can simply point it to the feature/threaded branch on my Github account, eg: export SWIFT_REPO=https://github.com/cschwede/swift export SWIFT_REPO_BRANCH=feature/threaded I recommend uninstalling eventlet within the SAIO VM for testing; this ensures Swift truly works without eventlet. Most test failures are related to timeouts and disconnects, especially when using EC. Some of them are related to blocking "queue.put" if the client is already gone and threads wait infinitely (this is also the reason why "pytest" does not exit after running "pytest test/unit/proxy"). Other test failures result from different result ordering (eventlet yields in a deterministic order; threading results are somewhat random, depending on the OS scheduler). I'm looking into possible solutions for this. If you want to benchmark the gunicorn-based deployment, you might want to change the "threads = 4" setting in the *-server.conf files. This (low) number should most likely be increased to achieve better performance. Any help with reviewing, testing, benchmarking and fixing the remaining issues is very welcome! Thanks, Christian [1] https://docs.openstack.org/swift/latest/development_saio.html [2] https://github.com/NVIDIA/vagrant-swift-all-in-one -- Red Hat GmbH <https://www.redhat.com/de/global/dach>, Registered seat: Werner von Siemens Ring 12, D-85630 Grasbrunn, Germany Commercial register: Amtsgericht Muenchen/Munich, HRB 153243, Managing Directors: Ryan Barnhart, Charles Cachera, Avril Crosse O'Flaherty
participants (1)
-
Christian Schwede