Ask Your Question
1

Problems with neutron-rootwrap

asked 2014-09-18 08:34:16 -0500

Roy gravatar image

updated 2014-10-01 08:58:30 -0500

Hi, I am an OpenStack newbie. I followed the excellent guide for installing OpenStack Icehouse on Ununtu 12.04. The problem I am having is with the network node, and with openvswitch-agent service. It doesn't start properly because it can't find rootwrap.cmd. Here is the relevant error log from /var/log/neutron/openvswitch-agent.log:

2014-09-18 15:27:18.854 7955 ERROR neutron.agent.linux.ovs_lib [-] Unable to execute ['ovs-vsctl', '--timeout=10', '--', '--may-exist', 'add-br', 'br-int']. Exception:
Command: ['sudo', '/usr/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=10', '--', '--may-exist', 'add-br', 'br-int']
Exit code: 1
Stdout: ''
Stderr: 'Traceback (most recent call last):\n  File "/usr/bin/neutron-rootwrap", line 6, in <module>\n    from oslo.rootwrap.cmd import main\nImportError: No module named rootwrap.cmd\n'
2014-09-18 15:27:18.979 7955 ERROR neutron.agent.linux.ovs_lib [-] Unable to execute ['ovs-vsctl', '--timeout=10', '--', 'set-fail-mode', 'br-int', 'secure']. Exception:
Command: ['sudo', '/usr/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=10', '--', 'set-fail-mode', 'br-int', 'secure']
Exit code: 1
Stdout: ''
Stderr: 'Traceback (most recent call last):\n  File "/usr/bin/neutron-rootwrap", line 6, in <module>\n    from oslo.rootwrap.cmd import main\nImportError: No module named rootwrap.cmd\n'
2014-09-18 15:27:18.980 7955 CRITICAL neutron [-]
Command: ['sudo', '/usr/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ovs-vsctl', '--timeout=10', '--', 'set-fail-mode', 'br-int', 'secure']
Exit code: 1
Stdout: ''
Stderr: 'Traceback (most recent call last):\n  File "/usr/bin/neutron-rootwrap", line 6, in <module>\n    from oslo.rootwrap.cmd import main\nImportError: No module named rootwrap.cmd\n'

After digging a little bit further, I found out that python refers to oslo as i built-in module, so probably it doesn't find rootwrap.cmd (which exists under python2.7/dist-packages) because of it.

root@network1:/home/user19# python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import oslo
>>> oslo
<module 'oslo' (built-in)>

In the controller the nova rootwrap doesn't look like that, and functions normally.

What can I do to make it work?

Thanks, Roy

Update from Oct 1st 2014:

Since the problem came back, this time with nova, I digged in a little bit further. It turned out that the server has two folders named oslo. One under /usr/lib/python2.7/dist-packages and the other one under /usr/local/lib/python2.7/dist-packages. Only one of them contained the folder rootwrap. Python found the other one first. As a quick and dirty solution, I did the following:

cp -a /usr/lib/python2.7/dist-packages/oslo/rootwrap/ /usr/local/lib/python2.7/dist-packages/oslo

It solved the problem.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2014-09-18 13:51:44 -0500

T u l gravatar image

More correct check in python should probably be from oslo import rootwrap

To solve, try: sudo apt-get install python-oslo.rootwrap

edit flag offensive delete link more

Comments

it was installed but it does not work for me, I tried the answer below and it worked.

Moe gravatar imageMoe ( 2015-01-11 00:54:34 -0500 )edit
4

answered 2014-10-28 06:33:56 -0500

sudo apt-get install python-oslo.rootwrap didn't work for me.

Problem solved after copying rootwrap subfolder, thanks :-) $ cp -a /usr/lib/python2.7/dist-packages/oslo/rootwrap/ /usr/local/lib/python2.7/dist-packages/oslo

edit flag offensive delete link more

Comments

worked for me too :) thanks dude!

Moe gravatar imageMoe ( 2015-01-11 00:53:55 -0500 )edit

It works for me too !!!

sagar.shedge92 gravatar imagesagar.shedge92 ( 2015-01-12 01:38:03 -0500 )edit
0

answered 2014-09-22 11:11:13 -0500

Roy gravatar image

I ended up re-installing the network node and compute node, this time with Ubuntu 14.04. This solved the problem in both places.

edit flag offensive delete link more

Comments

Hi Roy, I have the same issue, but I'm using the latest Ubuntu 14.04 desktop 64bit, network node still had the problem to locate the right rootwrap.cmd. Any idea?

Thanks, Tiger

unitiger gravatar imageunitiger ( 2014-09-26 07:04:35 -0500 )edit

I had two folders named "oslo". One under /usr/lib/python2.7/dist-packages (with rootwrap subfolder) and the other one under /usr/local/lib/python2.7/dist-packages (without rootwrap). After performing cp -a rootwrap to the second subtree, the problem was gone.

Roy gravatar imageRoy ( 2014-10-01 07:41:40 -0500 )edit

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: 2014-09-18 08:34:16 -0500

Seen: 2,809 times

Last updated: Oct 01 '14