Ask Your Question
1

problem starting neutron-openvswitch-agent

asked 2014-04-01 11:35:22 -0500

ospz2014 gravatar image

updated 2014-04-01 14:32:59 -0500

SamYaple gravatar image

chkconfig --list | awk '$5 ~ /on/ && $1 ~ /neutron/ {system("service" " " $1 " " "status")}' neutron-dhcp-agent (pid 15233) is running... neutron-metadata-agent (pid 15248) is running... neutron-openvswitch-agent dead but pid file exists

==========

Stderr: 'sudo: no tty present and no askpass program specified\n'
2014-04-01 09:15:31.657 15263 TRACE neutron Traceback (most recent call last):
2014-04-01 09:15:31.657 15263 TRACE neutron   File "/usr/bin/neutron-openvswitch-agent", line 10, in <module>
2014-04-01 09:15:31.657 15263 TRACE neutron     sys.exit(main())
2014-04-01 09:15:31.657 15263 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 1191, in main
2014-04-01 09:15:31.657 15263 TRACE neutron     plugin = OVSNeutronAgent(**agent_config)
2014-04-01 09:15:31.657 15263 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 195, in __init__
2014-04-01 09:15:31.657 15263 TRACE neutron     self.setup_physical_bridges(bridge_mappings)
2014-04-01 09:15:31.657 15263 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 797, in setup_physical_bridges
2014-04-01 09:15:31.657 15263 TRACE neutron     phys_veth_name)
2014-04-01 09:15:31.657 15263 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/agent/linux/ip_lib.py", line 129, in add_veth
2014-04-01 09:15:31.657 15263 TRACE neutron     self._as_root('', 'link', tuple(args))
2014-04-01 09:15:31.657 15263 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/agent/linux/ip_lib.py", line 70, in _as_root
2014-04-01 09:15:31.657 15263 TRACE neutron     namespace)
2014-04-01 09:15:31.657 15263 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/agent/linux/ip_lib.py", line 81, in _execute
2014-04-01 09:15:31.657 15263 TRACE neutron     root_helper=root_helper)
2014-04-01 09:15:31.657 15263 TRACE neutron   File "/usr/lib/python2.6/site-packages/neutron/agent/linux/utils.py", line 62, in execute
2014-04-01 09:15:31.657 15263 TRACE neutron     raise RuntimeError(m)
2014-04-01 09:15:31.657 15263 TRACE neutron RuntimeError:
2014-04-01 09:15:31.657 15263 TRACE neutron Command: ['sudo', 'neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'link', 'add', 'int-br-ex', 'type', 'veth', 'peer', 'name', 'phy-br-ex']
2014-04-01 09:15:31.657 15263 TRACE neutron Exit code: 1
2014-04-01 09:15:31.657 15263 TRACE neutron Stdout: ''
2014-04-01 09:15:31.657 15263 TRACE neutron Stderr: 'sudo: no tty present and no askpass program specified\n'
2014-04-01 09:15:31.657 15263 TRACE neutron

======

uname -r 2.6.32-431.11.2.el6.x86_64

python-neutron-2013.2.1-4.el6ost.noarch openstack-neutron-openvswitch-2013.2.1-4.el6ost.noarch python-neutronclient-2.3.1-2.el6ost.noarch openstack-neutron-2013.2.1-4.el6ost.noarch

That s the environment I am running, and other two compute nodes, i dont see a problem. Suggestions?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-04-01 14:46:58 -0500

SamYaple gravatar image

updated 2014-12-08 00:18:27 -0500

UPDATE:

I just ran into this issue. The advice below the break is still good advice, but in my case I was missing a configuration line.

in /etc/neutron/neutron.conf I added the following lines to resolve the issue.

[agent]
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf

sudo is failing to run properly. It is giving the error sudo: no tty present and no askpass program specified

I would check your sudo config files. You are a probably missing one. I have two that openstack installed with the content below.

/etc/sudoers.d/neutron_sudoers

Defaults:neutron !requiretty

neutron ALL = (root) NOPASSWD: /usr/bin/neutron-rootwrap

/etc/sudoers.d/nova_sudoers

Defaults:nova !requiretty

nova ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap
edit flag offensive delete link more

Comments

I checked, what is suggested above, looks like those files are already in place, and populated correctly I tried putting above lines instead, but same result.

ospz2014 gravatar imageospz2014 ( 2014-04-01 16:22:31 -0500 )edit

Then there may be a problem in your config. Would you please post your relevant neutron configs? The relevant line with be root_helper =

SamYaple gravatar imageSamYaple ( 2014-04-01 16:31:15 -0500 )edit

/etc/neutron/neutron.conf from compute node - grep root_helper neutron.conf

root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf

ospz2014 gravatar imageospz2014 ( 2014-04-02 11:53:42 -0500 )edit

I apologize, I can not help more in this situation. I am not able to reproduce it myself. It appears you have a problem calling sudo, but beyond that I don't know what exactly is causing this for you.

SamYaple gravatar imageSamYaple ( 2014-04-03 13:17:07 -0500 )edit

Thanks Sam. Adding the [agent] section into the /etc/neutron/neutron.conf file resolved the issue for me. Actually the "root_helper" property of the [agent] section should be consistent with the "/etc/sudoers.d/neutron_sudoers" file.

Saibal Dey gravatar imageSaibal Dey ( 2020-04-09 06:05:23 -0500 )edit
0

answered 2014-12-09 02:31:27 -0500

vinbs gravatar image

Hi ospz2014, could you post your /etc/sudoers file contents? Might be an issue with the configuration in the sudoers file.

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

Stats

Asked: 2014-04-01 11:35:22 -0500

Seen: 4,303 times

Last updated: Dec 08 '14