Satori should provide a way to override Popen

Bug #1412485 reported by Ryan Walker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
satori
Fix Committed
Undecided
Ryan Walker

Bug Description

Currently smb.py and bash.py both use subprocess.Popen. subprocess.Popen utilizes os.fork() to spawn child processes. If the process calling smb.py or bash.py has a large memory footprint, os.fork() performs very slowly due to memory allocation. It would be better for Satori to call Popen in a way that allowed a calling application to override the underlying Popen process to use something like posix_spawn instead for better performance.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to satori (master)

Fix proposed to branch: master
Review: https://review.openstack.org/148714

Changed in satori:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to satori (master)

Reviewed: https://review.openstack.org/148714
Committed: https://git.openstack.org/cgit/stackforge/satori/commit/?id=fd350f7f1c4da7c5dd5b925d77646a3cea27619b
Submitter: Jenkins
Branch: master

commit fd350f7f1c4da7c5dd5b925d77646a3cea27619b
Author: Ryan Walker <email address hidden>
Date: Mon Jan 19 11:28:04 2015 -0600

    Refactor Popen usage to allow overrides

    * Add subprocess.Popen wrapper in common
    * Change bash.py and smb.py to use wrapper.

    Because subprocess.Popen uses os.fork() to spawn child processes, it may
    be desirable for a calling application to override subprocess.Popen with
    a custom class that implements a different spawning method - such as
    posix_spawn. With large-memory applications, posix_spawn may be more
    desirable than os.fork() due to memory allocation behavior. This change
    allows Satori to be compatible with such a workflow.

    Change-Id: Ia60adea27d1a6cbf28341ea3aece5ee604a94583
    Closes-Bug: #1412485

Changed in satori:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.