At some point, we've switched to an alternative process launcher
that uses named pipes to communicate with the child processes. This
implementation has some issues, truncating the process output in some
situations.
This change switches back to subprocess.Popen, which is a much easier
and convenient way to perform exec calls. We're also ensuring that the
os module is not patched (which would cause subprocess.Popen to fail
on Windows due to an eventlet limitation, the reason why the above
mentioned implementation was first introduced).
We're also ensuring that such calls do not block other greenthreads
by leveraging eventlet.tpool.
Side note: I had to store subprocess.Popen in a variable in order
to avoid having OpenStack bandit complaining, even though we're
explicitly passing "shell=False": http://paste.openstack.org/raw/658319/
Closes-Bug: #1709931
Change-Id: Ib58e12030e69ea10862452c2f141a7a5f2527621
(cherry picked from commit 82d468ba7fd6dce91fec015d39126e71c1434fb1)
Reviewed: https:/ /review. openstack. org/575670 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=a4f91358a00 38c6bf373cdbfd8 8a12e4c495a2bc
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit a4f91358a0038c6 bf373cdbfd88a12 e4c495a2bc
Author: Lucian Petrut <email address hidden>
Date: Wed Aug 9 13:50:09 2017 +0300
Windows: fix exec calls
At some point, we've switched to an alternative process launcher
that uses named pipes to communicate with the child processes. This
implementation has some issues, truncating the process output in some
situations.
This change switches back to subprocess.Popen, which is a much easier
and convenient way to perform exec calls. We're also ensuring that the
os module is not patched (which would cause subprocess.Popen to fail
on Windows due to an eventlet limitation, the reason why the above
mentioned implementation was first introduced).
We're also ensuring that such calls do not block other greenthreads
by leveraging eventlet.tpool.
Side note: I had to store subprocess.Popen in a variable in order paste.openstack .org/raw/ 658319/
to avoid having OpenStack bandit complaining, even though we're
explicitly passing "shell=False":
http://
Closes-Bug: #1709931
Change-Id: Ib58e12030e69ea 10862452c2f141a 7a5f2527621 91fec015d39126e 71c1434fb1)
(cherry picked from commit 82d468ba7fd6dce