Description of problem: The neutron Open vSwitch agent init script assumes use of the Open vSwitch plug-in by explicitly looking for the associated configuration file. From /etc/init.d/neutron-openvswitch-agent: configs=( "/usr/share/$proj/$proj-dist.conf" \ "/etc/$proj/$proj.conf" \ "/etc/$proj/plugins/openvswitch/ovs_neutron_plugin.ini" \ ) When using the ML2 plug-in, this init script should reference ml2_conf.ini. In comparison, the neutron server init script references the "plugin.ini" symlink that references the active plug-in configuration file. From /etc/init.d/neutron-server: configs=( "/usr/share/$prog/$prog-dist.conf" \ "/etc/$prog/$prog.conf" \ "/etc/$prog/plugin.ini" \ ) Version-Release number of selected component (if applicable): openstack-neutron-openvswitch-2014.1-0.13.rc1.el6.noarch How reproducible: Consistent. Steps to Reproduce: 1. Install OpenStack with neutron and the ML2 plug-in. 2. Configure neutron and the ML2 plug-in. 3. Start the neutron-openvswitch-agent service. Actual results: The neutron-openvswitch-agent service fails to start. 2014-04-14 16:34:04.068 3781 CRITICAL neutron [req-3cc35f1e-b5e9-4c86-b7a8-545b42f690a9 None] 'NoneType' object has no attribute 'rpartition' 2014-04-14 16:34:04.068 3781 TRACE neutron Traceback (most recent call last): 2014-04-14 16:34:04.068 3781 TRACE neutron File "/usr/bin/neutron-openvswitch-agent", line 10, in <module> 2014-04-14 16:34:04.068 3781 TRACE neutron sys.exit(main()) 2014-04-14 16:34:04.068 3781 TRACE neutron File "/usr/lib/python2.6/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 1359, in main 2014-04-14 16:34:04.068 3781 TRACE neutron agent = OVSNeutronAgent(**agent_config) 2014-04-14 16:34:04.068 3781 TRACE neutron File "/usr/lib/python2.6/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 222, in __init__ 2014-04-14 16:34:04.068 3781 TRACE neutron root_helper) 2014-04-14 16:34:04.068 3781 TRACE neutron File "/usr/lib/python2.6/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 113, in __init__ 2014-04-14 16:34:04.068 3781 TRACE neutron self.init_firewall(defer_refresh_firewall=True) 2014-04-14 16:34:04.068 3781 TRACE neutron File "/usr/lib/python2.6/site-packages/neutron/agent/securitygroups_rpc.py", line 140, in init_firewall 2014-04-14 16:34:04.068 3781 TRACE neutron self.firewall = importutils.import_object(firewall_driver) 2014-04-14 16:34:04.068 3781 TRACE neutron File "/usr/lib/python2.6/site-packages/neutron/openstack/common/importutils.py", line 38, in import_object 2014-04-14 16:34:04.068 3781 TRACE neutron return import_class(import_str)(*args, **kwargs) 2014-04-14 16:34:04.068 3781 TRACE neutron File "/usr/lib/python2.6/site-packages/neutron/openstack/common/importutils.py", line 26, in import_class 2014-04-14 16:34:04.068 3781 TRACE neutron mod_str, _sep, class_str = import_str.rpartition('.') 2014-04-14 16:34:04.068 3781 TRACE neutron AttributeError: 'NoneType' object has no attribute 'rpartition' 2014-04-14 16:34:04.068 3781 TRACE neutron Expected results: The neutron-openswitch-agent service starts.
I just checked on a systemd-based system, I think I can confirm what you're seeing: I checked with this package version -- openstack-neutron-2014.1.1-1.fc21 $ cat /usr/lib/systemd/system/neutron-openvswitch-agent.service | grep Service -A5 [Service] Type=simple User=neutron ExecStart=/usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini --log-file /var/log/neutron/openvswitch-agent.log PrivateTmp=true $ cat /usr/lib/systemd/system/neutron-server.service | grep Service -A5 [Service] Type=simple User=neutron ExecStart=/usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini --log-file /var/log/neutron/server.log PrivateTmp=true However, I don't see a trace (in/var/log/neutron/openvswitch-agent.log) similar to you when I restart Neutron OVS agent. This, I tested with openstack-neutron-openvswitch-2013.2.3-7.fc20.noarch
FYI: the bug was discussed by RDO packaging neutron team, and it was pointed out that: - current approach, not ideal in any way, still works; - any change like that will require synchronised effort on both neutron and installers' (packstack, foreman, ...) side; - we will need to cope with any upgrade issues (people configuring their agent via old config file missing their configuration after upgrade to new plugin.ini -> ml2 symlink. That said, it was pushed further in the future.
And another point: if you're interested in smooth installation, I recommend you to use available installers (packstack being the most mature).
Just hit this issue. As it currently is the documented setup (with symlinking the /etc/neutron/plugin.ini file to the appropriate location) of the old/ml2 config does not work. Documentation: http://docs.openstack.org/icehouse/install-guide/install/yum/content/neutron-ml2-controller-node.html Could we please make sure the docs actually work? We could always fallback to the old location if /etc/neutron/plugin.ini does not exist for backwards compatibility... Now it needs troubleshooting and a ugly hack to get it to work (making and maintaining our own the init script or symlinking plugins/openvswitch/ovs_neutron_plugin.ini to the ml2.ini)
Ok, there is some confusion on what daemon uses what. It appears that, although ml2 is configured, for openvswitch the openvswitch.ini file should still be used. The symlink for plug.ini to ml2.ini is just used for the server part? Documentation should be a bit more clear on this. At least according to this mailthread: http://www.gossamer-threads.com/lists/openstack/operators/39745
(In reply to robert.vanleeuwen from comment #5) > Ok, there is some confusion on what daemon uses what. > It appears that, although ml2 is configured, for openvswitch the > openvswitch.ini file should still be used. > > The symlink for plug.ini to ml2.ini is just used for the server part? > Documentation should be a bit more clear on this. > > At least according to this mailthread: > http://www.gossamer-threads.com/lists/openstack/operators/39745 I agree with robert here. It's common that you have a network node, and this network node doesn't require ML2 installed (ml2 is only mandatory to the controller). In that case the missing setting should be added to the ovs ini file, which our deployment tools do (or used to do for icehouse at least): BTW, same upstream: https://github.com/openstack/neutron/blob/master/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini#L154 Probably looks like a bug in neutron itself needing to declare a default firewall_driver in the ovs_neutron_plugin.ini
Read thru the forum thread, and the puppet patch [1]. Here is a brief summary of my understanding: - ML2 plugin may not be present on Compute/Networker node; - using explicit ovs_neutron_plugin.ini is the right thing to do (same for other agents); - upstream documentation is wrong when it suggests to set OVS specific configuration in ml2_conf.ini [2]; - upstream documentation is also wrong when saying: "Due to a packaging bug, the Open vSwitch agent initialization script explicitly looks for the Open vSwitch plug-in configuration file rather than a symbolic link /etc/neutron/plugin.ini pointing to the ML2 plug-in configuration file." It's not a bug, and if other distributions (Ubuntu?) use ML2 file to set OVS agent, they are doing it wrong. So we do not need to apply any changes for our service units, but we need to make sure the documentation is correct. [1]: https://review.openstack.org/#/c/106144/7 [2]: http://docs.openstack.org/icehouse/install-guide/install/yum/content/neutron-ml2-network-node.html
Since we assume this is not a bug, I'm closing it. I've also created an upstream bug for documentation (see external tracker link above).