Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-17938

[fork vs multiprocessing] 2 - Refactor service.py to use spawn-safe pools

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • python-oslo-service
    • None
    • Sprint 9, Sprint 10, Sprint 11, Sprint 12
    • 4
    • Important

      Goal: Replace every direct Pool or Context usage in service.py (ProcessLauncher and respawn logic) with the new helpers to avoid threading-lock inheritance during worker respawn.

      Acceptance Criteria:

      • Verify service.py imports only get_spawn_pool / get_spawn_context for multiprocessing.
      • Verify worker restart flow (_respawn_children) spawns processes without using fork start method.
      • Run functional test: start a fake service that holds a logging lock, trigger a respawn, and confirm no deadlock.
      • Code compiles with Python 3.12.

      Additional Details:
      See https://pythonspeed.com/articles/python-multiprocessing/ and video explanation at https://youtu.be/RIc-Tut95YM?t=185.

              mbollo@redhat.com Daniel Mats Niklas Bengtsson
              hberaud Hervé Beraud
              rhos-dfg-pidone
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: