plugins/xenserver/networking/etc/xensource/scripts/novalib.py uses subprocess incorrectly
Bug #1286187 reported by
Johannes Erdfelt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Both execute_
execute_
execute() sets up a PIPE for the process stdout, but doesn't do any reads before returning to the caller. This could make the code execute multiple processes in parallel leading to a race condition that could cause commands to execute in the opposite order that is intended. It could potentially also cause the process to block on writes to the PIPE that isn't being read leading it to never finish executing.
Changed in nova: | |
milestone: | none → icehouse-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | icehouse-3 → 2014.1 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/77198 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=27c80860280 ca5f7983d207cdb fd217ac1a2d68d
Committed: https:/
Submitter: Jenkins
Branch: master
commit 27c80860280ca5f 7983d207cdbfd21 7ac1a2d68d
Author: Johannes Erdfelt <email address hidden>
Date: Fri Feb 28 15:35:34 2014 +0000
xenapi plugins: Make sure subprocesses finish executing
Fixes bug 1286187
Neither execute_ get_output( ) nor execute() would wait for the process to
fully finish executing. This could potentially create a race condition
where commands execute in a different order than intended.
Also, for execute() it could cause a process to never finish executing if
it generates enough output to block writing to the pipe.
Change-Id: I3404f4b3ca1cdd eec2f3e7b393817 a6ccc42bec7