neutron:Mapping physical network physnet2 to bridge br-eth1 failed due to Permission denied

asked 2014-05-13 01:59:29 -0600

Eli Qiao gravatar image

updated 2014-05-13 09:59:04 -0600

When starting neutron-openvswitch-agent.service, I got failed.

/etc/neutron/plugin.ini :

   2014-05-13 10:53:32.079 31962 INFO neutron.plugins.openvswitch.agent.ovs_neutron_agent [-] Mapping physical network physnet2 to bridge br-eth1
    2014-05-13 10:53:32.462 31962 CRITICAL neutron [-] [Errno 13] Permission denied
    2014-05-13 10:53:32.462 31962 TRACE neutron Traceback (most recent call last):
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/bin/neutron-openvswitch-agent", line 10, in <module>
    2014-05-13 10:53:32.462 31962 TRACE neutron     sys.exit(main())
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/lib/python2.7/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 1191, in main
    2014-05-13 10:53:32.462 31962 TRACE neutron     plugin = OVSNeutronAgent(**agent_config)
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/lib/python2.7/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 195, in __init__
    2014-05-13 10:53:32.462 31962 TRACE neutron     self.setup_physical_bridges(bridge_mappings)
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/lib/python2.7/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 795, in setup_physical_bridges
    2014-05-13 10:53:32.462 31962 TRACE neutron     utils.execute(['/sbin/udevadm', 'settle', '--timeout=10'])
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py", line 65, in execute
    2014-05-13 10:53:32.462 31962 TRACE neutron     addl_env=addl_env)
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py", line 56, in create_process
    2014-05-13 10:53:32.462 31962 TRACE neutron     env=env)
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/lib/python2.7/site-packages/neutron/common/utils.py", line 125, in subprocess_popen
    2014-05-13 10:53:32.462 31962 TRACE neutron     close_fds=True, env=env)
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/lib/python2.7/site-packages/eventlet/green/subprocess.py", line 25, in __init__
    2014-05-13 10:53:32.462 31962 TRACE neutron     subprocess_orig.Popen.__init__(self, args, 0, *argss, **kwds)
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    2014-05-13 10:53:32.462 31962 TRACE neutron     errread, errwrite)
    2014-05-13 10:53:32.462 31962 TRACE neutron   File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child
    2014-05-13 10:53:32.462 31962 TRACE neutron     raise child_exception
    2014-05-13 10:53:32.462 31962 TRACE neutron OSError: [Errno 13] Permission denied

   [root@stack-kvm110 ~(keystone_admin)]# cat /etc/neutron/plugin.ini | grep  bridge_mappings
# bridge_mappings =
# Example: bridge_mappings = physnet1:br-eth1
bridge_mappings = physnet2:br-eth1,physnet1:br-ex
# bridge_mappings = default:br-eth1

This is not reproducable every time, if I try to restart neutron-openvswitch-agent.service , sometimes it can active.

edit retag flag offensive close merge delete

Comments

What distro and version? Try running sudo -u neutron /sbin/udevadm settle --timeout=10 in a console. Does it sometimes give the 'Permission denied' error?

darragh-oreilly gravatar imagedarragh-oreilly ( 2014-05-14 03:33:23 -0600 )edit

python-neutron-2013.2.3-2.fc20.noarch openstack-neutron-2013.2.3-2.fc20.noarch openstack-neutron-openvswitch-2013.2.3-2.fc20.noarch python-neutronclient-2.3.4-1.fc20.noarch

[root@stack-kvm110 ~(keystone_admin)]# sudo -u neutron /sbin/udevadm settle --timeout=10 [root@stack-kvm110 ~(keystone_admin)]# echo $? 0

Eli Qiao gravatar imageEli Qiao ( 2014-05-14 03:50:20 -0600 )edit

I think your problem is that sometimes udevadm gives the permissions error. It is the distro that provides udevadm, so your problem might be specific to the distro/version you are using.

darragh-oreilly gravatar imagedarragh-oreilly ( 2014-05-14 05:00:16 -0600 )edit