Bug 1019487 - neutron-dhcp-agent fails to start without openstack-neutron-openvswitch installed
neutron-dhcp-agent fails to start without openstack-neutron-openvswitch insta...
Status: CLOSED CURRENTRELEASE
Product: RDO
Classification: Community
Component: openstack-neutron (Show other bugs)
unspecified
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Ihar Hrachyshka
Ofer Blaut
network
: Triaged
Depends On:
Blocks: 1070113
  Show dependency treegraph
 
Reported: 2013-10-15 16:43 EDT by Aron Parsons
Modified: 2016-04-26 14:10 EDT (History)
6 users (show)

See Also:
Fixed In Version: openstack-neutron-2014.1.1-7.el6 openstack-neutron-2014.1.1-7.el7 openstack-neutron-2014.1.1-7.fc21 openstack-neutron-2013.2.3-10.el6 openstack-neutron-2013.2.3-12.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1070113 (view as bug list)
Environment:
Last Closed: 2016-03-30 19:11:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1271449 None None None Never

  None (edit)
Description Aron Parsons 2013-10-15 16:43:41 EDT
Description of problem:
neutron-dhcp-agent always tries to import openvswitch.common, but it may not be installed if you opted to not use openvswitch in your packstack answer file.

Version-Release number of selected component (if applicable):
openstack-neutron-2013.2-0.12.rc1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. install openstack via packstack without openvswitch support
2. service neutron-dhcp-agent start

Actual results:
neutron-dhcp-agent fails to start

Expected results:
neutron-dhcp-agent starts

Additional info:
-bash-4.1$ rpm -qa | grep neutron | sort
openstack-neutron-2013.2-0.12.rc1.el6.noarch
openstack-neutron-bigswitch-2013.2-0.12.rc1.el6.noarch
openstack-neutron-brocade-2013.2-0.12.rc1.el6.noarch
openstack-neutron-cisco-2013.2-0.12.rc1.el6.noarch
openstack-neutron-hyperv-2013.2-0.12.rc1.el6.noarch
openstack-neutron-linuxbridge-2013.2-0.12.rc1.el6.noarch
openstack-neutron-mellanox-2013.2-0.12.rc1.el6.noarch
openstack-neutron-metaplugin-2013.2-0.12.rc1.el6.noarch
openstack-neutron-midonet-2013.2-0.12.rc1.el6.noarch
openstack-neutron-ml2-2013.2-0.12.rc1.el6.noarch
openstack-neutron-nec-2013.2-0.12.rc1.el6.noarch
openstack-neutron-nicira-2013.2-0.12.rc1.el6.noarch
openstack-neutron-plumgrid-2013.2-0.12.rc1.el6.noarch
openstack-neutron-ryu-2013.2-0.12.rc1.el6.noarch
openstack-neutron-vpn-agent-2013.2-0.12.rc1.el6.noarch
python-neutron-2013.2-0.12.rc1.el6.noarch
python-neutronclient-2.3.1-1.el6.noarch

-bash-4.1$ neutron-dhcp-agent -h
Traceback (most recent call last):
  File "/usr/bin/neutron-dhcp-agent", line 6, in <module>
    from neutron.agent.dhcp_agent import main
  File "/usr/lib/python2.6/site-packages/neutron/agent/dhcp_agent.py", line 27, in <module>
    from neutron.agent.linux import interface
  File "/usr/lib/python2.6/site-packages/neutron/agent/linux/interface.py", line 25, in <module>
    from neutron.agent.linux import ovs_lib
  File "/usr/lib/python2.6/site-packages/neutron/agent/linux/ovs_lib.py", line 27, in <module>
    from neutron.plugins.openvswitch.common import constants
ImportError: No module named openvswitch.common

-bash-4.1$ sudo yum -q -y install openstack-neutron-openvswitch
[sudo] password for parsonsa: 

-bash-4.1$ neutron-dhcp-agent -h
usage: neutron-dhcp-agent [-h] [--config-dir DIR] [--config-file PATH]
                          [--debug] [--log-config PATH]
                          [--log-date-format DATE_FORMAT] [--log-dir LOG_DIR]
...
Comment 1 Lars Kellogg-Stedman 2014-01-15 11:05:25 EST
Can you confirm that this is still an issue with the updated packages currently in RDO?
Comment 2 Aron Parsons 2014-01-16 16:11:43 EST
Yes, the Requires: is still not there in openstack-neutron-2013.2.1-1.el6.noarch.rpm
Comment 3 Lars Kellogg-Stedman 2014-01-16 17:27:19 EST
Behavior is as described, and is caused by the following in neutron/agent/linux_ovs_lib.py:

  #  TODO(JLH) Should we remove the explicit include of the ovs plugin here
  from neutron.plugins.openvswitch.common import constants

This import still exists in neutron master, so for now we can just unilaterally include the openstack-neutron-openvswitch package unilaterally and add an appropriate Requires: to openstack-neutron.
Comment 4 Ihar Hrachyshka 2014-07-17 08:18:12 EDT
The fix is not to depend on openstack-neutron-openvswitch, but to move all python files back to python-neutron, so as to avoid any hidden import dependencies being broken by python code split among plugin packages.

Note You need to log in before you can comment on or make changes to this bug.