Ask Your Question
1

Network Worker crashes on start with Eventlet Error

asked 2011-02-16 03:38:30 -0500

antonym gravatar image

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 (http://bazaar.launchpad.net/~hudson-o...)

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
1

answered 2011-02-20 15:17:02 -0500

berendt gravatar image

for users of other distributions:

you have to apply this patch to python-eventlet:

Description: Prevent subprocess module from rewrapping GreenPipes Author: Soren Hansen soren@linux2go.dk Forwarded: https://bitbucket.org/which_linden/eventlet/issue/77/subprocess-module-fails-if-os-module-is (https://bitbucket.org/which_linden/ev...) 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__

edit flag offensive delete link more
0

answered 2011-02-23 11:10:38 -0500

See above

edit flag offensive delete link more
0

answered 2011-02-16 14:34:51 -0500

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

edit flag offensive delete link more
0

answered 2011-02-16 04:36:40 -0500

vishvananda gravatar image

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-o...

** 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.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 ...

(more)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-02-16 03:38:30 -0500

Seen: 58 times

Last updated: Feb 23 '11