Network Worker crashes on start with Eventlet Error

Bug #719765 reported by Antony Messerli

This bug report was converted into a question: question #146545: Network Worker crashes on start with Eventlet Error.

10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

Running trunk of nova, I get this traceback immediately on starting the network worker:
2011-02-15 21:39:18,111 CRITICAL nova.root [-] f(ile) should be int, str, unicode or file, not <open GreenPipe '<fd:4>', mode 'wb' at 0x248db00>
(nova.root): TRACE: Traceback (most recent call last):
(nova.root): TRACE: File "bin/nova-network", line 44, in <module>
(nova.root): TRACE: service.serve()
(nova.root): TRACE: File "/root/openstack/blah/nova/nova/service.py", line 231, in serve
(nova.root): TRACE: x.start()
(nova.root): TRACE: File "/root/openstack/blah/nova/nova/service.py", line 81, in start
(nova.root): TRACE: self.manager.init_host()
(nova.root): TRACE: File "/root/openstack/blah/nova/nova/network/manager.py", line 470, in init_host
(nova.root): TRACE: super(VlanManager, self).init_host()
(nova.root): TRACE: File "/root/openstack/blah/nova/nova/network/manager.py", line 124, in init_host
(nova.root): TRACE: self.driver.init_host()
(nova.root): TRACE: File "/root/openstack/blah/nova/nova/network/linux_net.py", line 118, in init_host
(nova.root): TRACE: check_exit_code=False)
(nova.root): TRACE: File "/root/openstack/blah/nova/nova/network/linux_net.py", line 383, in _execute
(nova.root): TRACE: return utils.execute(cmd, *args, **kwargs)
(nova.root): TRACE: File "/root/openstack/blah/nova/nova/utils.py", line 133, in execute
(nova.root): TRACE: stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
(nova.root): TRACE: File "/usr/local/lib/python2.6/dist-packages/eventlet-0.9.14-py2.6.egg/eventlet/green/subprocess.py", line 31, in __init__
(nova.root): TRACE: wrapped_pipe = greenio.GreenPipe(pipe, pipe.mode, bufsize)
(nova.root): TRACE: File "/usr/local/lib/python2.6/dist-packages/eventlet-0.9.14-py2.6.egg/eventlet/greenio.py", line 386, in __init__
(nova.root): TRACE: raise TypeError('f(ile) should be int, str, unicode or file, not %r' % f)
(nova.root): TRACE: TypeError: f(ile) should be int, str, unicode or file, not <open GreenPipe '<fd:4>', mode 'wb' at 0x248db00>
(nova.root): TRACE:

It appears to have been introduced in rev 674.

http://bazaar.launchpad.net/~hudson-openstack/nova/trunk/revision/674

Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 719765] [NEW] Network Worker crashes on start with Eventlet Error
Download full text (5.0 KiB)

You need the new eventlet package from the ppa

On Feb 15, 2011, at 7:38 PM, Antony Messerli wrote:

> Public bug reported:
>
> Running trunk of nova, I get this traceback immediately on starting the network worker:
> 2011-02-15 21:39:18,111 CRITICAL nova.root [-] f(ile) should be int, str, unicode or file, not <open GreenPipe '<fd:4>', mode 'wb' at 0x248db00>
> (nova.root): TRACE: Traceback (most recent call last):
> (nova.root): TRACE: File "bin/nova-network", line 44, in <module>
> (nova.root): TRACE: service.serve()
> (nova.root): TRACE: File "/root/openstack/blah/nova/nova/service.py", line 231, in serve
> (nova.root): TRACE: x.start()
> (nova.root): TRACE: File "/root/openstack/blah/nova/nova/service.py", line 81, in start
> (nova.root): TRACE: self.manager.init_host()
> (nova.root): TRACE: File "/root/openstack/blah/nova/nova/network/manager.py", line 470, in init_host
> (nova.root): TRACE: super(VlanManager, self).init_host()
> (nova.root): TRACE: File "/root/openstack/blah/nova/nova/network/manager.py", line 124, in init_host
> (nova.root): TRACE: self.driver.init_host()
> (nova.root): TRACE: File "/root/openstack/blah/nova/nova/network/linux_net.py", line 118, in init_host
> (nova.root): TRACE: check_exit_code=False)
> (nova.root): TRACE: File "/root/openstack/blah/nova/nova/network/linux_net.py", line 383, in _execute
> (nova.root): TRACE: return utils.execute(cmd, *args, **kwargs)
> (nova.root): TRACE: File "/root/openstack/blah/nova/nova/utils.py", line 133, in execute
> (nova.root): TRACE: stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
> (nova.root): TRACE: File "/usr/local/lib/python2.6/dist-packages/eventlet-0.9.14-py2.6.egg/eventlet/green/subprocess.py", line 31, in __init__
> (nova.root): TRACE: wrapped_pipe = greenio.GreenPipe(pipe, pipe.mode, bufsize)
> (nova.root): TRACE: File "/usr/local/lib/python2.6/dist-packages/eventlet-0.9.14-py2.6.egg/eventlet/greenio.py", line 386, in __init__
> (nova.root): TRACE: raise TypeError('f(ile) should be int, str, unicode or file, not %r' % f)
> (nova.root): TRACE: TypeError: f(ile) should be int, str, unicode or file, not <open GreenPipe '<fd:4>', mode 'wb' at 0x248db00>
> (nova.root): TRACE:
>
> It appears to have been introduced in rev 674.
>
> http://bazaar.launchpad.net/~hudson-openstack/nova/trunk/revision/674
>
> ** Affects: nova
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of Nova Bug
> Team, which is subscribed to OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/719765
>
> Title:
> Network Worker crashes on start with Eventlet Error
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> Running trunk of nova, I get this traceback immediately on starting the network worker:
> 2011-02-15 21:39:18,111 CRITICAL nova.root [-] f(ile) should be int, str, unicode or file, not <open GreenPipe '<fd:4>', mode 'wb' at 0x248db00>
> (nova.root): TRACE: Traceback (most recent call last):
> (nova.root): TRACE: File "bin/nova-network", line 44, in <module>
> (nova.root): TRACE: service.serve()
> (nova.roo...

Read more...

Revision history for this message
Kost (kost-isi) wrote :

I had this error as well. The fix is:

sudo apt-get update
sudo apt-get install python-eventlet
sudo service nova-network start
ps -ef | grep nova-network
nova 3064 1 0 09:32 ? 00:00:00 su -c nova-network --flagfile=/etc/nova/nova.conf nova
nova 3071 3064 12 09:32 ? 00:00:00 /usr/bin/python /usr/bin/nova-network --flagfile=/etc/nova/nova.conf
root 3140 3563 0 09:33 pts/0 00:00:00 grep --color=auto nova-network

Revision history for this message
Christian Berendt (berendt) wrote :

for users of other distributions:

you have to apply this patch to python-eventlet:

Description: Prevent subprocess module from rewrapping GreenPipes
Author: Soren Hansen <email address hidden>
Forwarded: https://bitbucket.org/which_linden/eventlet/issue/77/subprocess-module-fails-if-os-module-is
Last-Update: 2011-02-14

Index: python-eventlet-0.9.14/eventlet/green/subprocess.py
===================================================================
--- python-eventlet-0.9.14.orig/eventlet/green/subprocess.py 2011-02-14 11:31:39.917609581 +0100
+++ python-eventlet-0.9.14/eventlet/green/subprocess.py 2011-02-14 11:31:45.767618158 +0100
@@ -27,7 +27,7 @@
             # eventlet.processes.Process.run() method.
             for attr in "stdin", "stdout", "stderr":
                 pipe = getattr(self, attr)
- if pipe is not None:
+ if pipe is not None and not type(pipe) == greenio.GreenPipe:
                     wrapped_pipe = greenio.GreenPipe(pipe, pipe.mode, bufsize)
                     setattr(self, attr, wrapped_pipe)
         __init__.__doc__ = subprocess_orig.Popen.__init__.__doc__

Thierry Carrez (ttx)
Changed in nova:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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