← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1287486] [NEW] processutils.execute can not run background task

 

Public bug reported:

This bug is reported from ironic, we are using the --background option
in processutils.execute(), but it hangs, sees  the processutils.execute
which doesn't support running tasks in background because it PIPES the
std{in,out,err} interface causing communicate to hang[1].

A quick test:

In [15]: p = subprocess.Popen("sleep 10&", stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True) In [16]: p.communicate()

hangs...

In [11]: p = subprocess.Popen("sleep 10&", shell=True) In [12]:
p.communicate() Out[12]: (None, None)

doesn't hangs...

[1]
https://github.com/openstack/ironic/blob/master/ironic/openstack/common/processutils.py#L153-L155

Could you please help to fix it? Thx.

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1287486

Title:
  processutils.execute can not run background task

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  This bug is reported from ironic, we are using the --background option
  in processutils.execute(), but it hangs, sees  the
  processutils.execute which doesn't support running tasks in background
  because it PIPES the std{in,out,err} interface causing communicate to
  hang[1].

  A quick test:

  In [15]: p = subprocess.Popen("sleep 10&", stdout=subprocess.PIPE,
  stderr=subprocess.PIPE, shell=True) In [16]: p.communicate()

  hangs...

  In [11]: p = subprocess.Popen("sleep 10&", shell=True) In [12]:
  p.communicate() Out[12]: (None, None)

  doesn't hangs...

  [1]
  https://github.com/openstack/ironic/blob/master/ironic/openstack/common/processutils.py#L153-L155

  Could you please help to fix it? Thx.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1287486/+subscriptions


Follow ups

References