-
Story
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
3
-
False
-
-
False
-
rhos-ops-day1day2-hardprov
-
-
-
HardProv Sprint 8, HardProv Sprint 9
-
2
Goal:
- As a maintainer, I need to remove the remaining eventlet.sleeps and any tests requiring/expecting eventlet in order to be able to remove the eventlet monkey_patch pattern.
Context:
In the Ironic code there are some lingering eventlet invocations which need to be removed:
Specifically eventlet.sleep() which can be swapped to time.sleep() in the short term and yield in some limited cases where we want to allow the interpreter and thread execution pattern to be able to stop thread focus. This doesn't really apply to normal threads, but while in the migration state, we need to keep that around to ease the migration.
Beyond eventlet.sleep, we also have some other invocations in the code which we need to ensure are no longer present in tests as well, because the underlying pattern requires eventlet to be used. Specifically, via a grep command:
./ironic/tests/unit/conductor/test_base_manager.py:import eventlet
./ironic/tests/unit/conductor/test_base_manager.py: @mock.patch.object(eventlet.greenpool.GreenPool, 'waitall', autospec=True)
./ironic/tests/unit/drivers/modules/redfish/test_power.py:@mock.patch('oslo_utils.eventletutils.EventletEvent.wait',
./ironic/tests/unit/drivers/modules/inspector/test_interface.py:import eventlet
./ironic/tests/unit/drivers/modules/inspector/test_interface.py:@mock.patch.object(eventlet, 'spawn_n', lambda f, *a, **kw: f(*a, **kw))
So to near completion on the migration, we need to remove these loose ends.
Acceptance Criteria:
<-- Notes for defining Acceptance Criteria - remove these notes before saving -->
A list of verification conditions, successful functional tests, or expected outcomes in order to declare this story/task successfully completed.
- No more eventlet.sleep() invocations in the ironic code base, potentially replaced with time.sleep() where appropriate.
- No tests leveraging eventlet for unit test mocks.
- Merged and Passing CI.