Bug 1127545

Summary: openstack-neutron RPM package contains vendor plugin code, preventing vendors from providing their own code
Product: Red Hat OpenStack Reporter: Midokura <dev>
Component: openstack-neutronAssignee: Ihar Hrachyshka <ihrachys>
Status: CLOSED NOTABUG QA Contact: Ofer Blaut <oblaut>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 6)CC: chrisw, dev, nyechiel, yeylon
Target Milestone: ---   
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-20 08:01:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Midokura 2014-08-07 06:08:19 UTC
Description of problem:

Since Neutron upstream code review process takes time, we maintain our plugin code downstream for production. The plugin package contains files under neutron.plugins.midonet module, but since neutron-server contains plugin filed, you cannot install our plugin without --force option. 


Version-Release number of selected component (if applicable):

python-neutron-2014.1.1-4.el6ost.noarch

How reproducible:



Steps to Reproduce:
1. install python-neutron-2014.1.1-4.el6ost.noarch
2. install midonet plugin, which contains files under neutron.plugins.midonet


Actual results:

[root@ika ~]# rpm -i python-neutron-plugin-midonet-3.3-1.noarch.rpm 
	package python-neutron-plugin-midonet-1:3.3-1.noarch is already installed
	file /usr/lib/python2.6/site-packages/neutron/plugins/midonet/__init__.py from install of python-neutron-plugin-midonet-1:3.3-1.noarch conflicts with file from package python-neutron-2014.1.1-4.el6ost.noarch
	file /usr/lib/python2.6/site-packages/neutron/plugins/midonet/agent/__init__.py from install of python-neutron-plugin-midonet-1:3.3-1.noarch conflicts with file from package python-neutron-2014.1.1-4.el6ost.noarch
	file /usr/lib/python2.6/site-packages/neutron/plugins/midonet/common/__init__.py from install of python-neutron-plugin-midonet-1:3.3-1.noarch conflicts with file from package python-neutron-2014.1.1-4.el6ost.noarch
	file /usr/lib/python2.6/site-packages/neutron/plugins/midonet/agent/midonet_driver.py from install of python-neutron-plugin-midonet-1:3.3-1.noarch conflicts with file from package python-neutron-2014.1.1-4.el6ost.noarch
	file /usr/lib/python2.6/site-packages/neutron/plugins/midonet/common/config.py from install of python-neutron-plugin-midonet-1:3.3-1.noarch conflicts with file from package python-neutron-2014.1.1-4.el6ost.noarch
	file /usr/lib/python2.6/site-packages/neutron/plugins/midonet/common/net_util.py from install of python-neutron-plugin-midonet-1:3.3-1.noarch conflicts with file from package python-neutron-2014.1.1-4.el6ost.noarch
	file /usr/lib/python2.6/site-packages/neutron/plugins/midonet/midonet_lib.py from install of python-neutron-plugin-midonet-1:3.3-1.noarch conflicts with file from package python-neutron-2014.1.1-4.el6ost.noarch
	file /usr/lib/python2.6/site-packages/neutron/plugins/midonet/plugin.py from install of python-neutron-plugin-midonet-1:3.3-1.noarch conflicts with file from package python-neutron-2014.1.1-4.el6ost.noarch



Expected results:

Vendor plugins should be able to install without conflicting with the core of neutron package. 


Additional info:

Comment 2 Ihar Hrachyshka 2014-08-13 12:34:47 UTC
Please don't use --force to replace Red Hat shipped files. It potentially breaks distribution and will probably result in GSS not providing support for the broken distribution.

If I were you, I would instead install your plugin in some separate directory and then augment PYTHONPATH so that it points to your directory first. This should make Python to use your custom code.

See more details on PYTHONPATH at: https://docs.python.org/2/using/cmdline.html

If you need to manipulate the list from Python, you may modify sys.path: https://docs.python.org/2/library/sys.html#sys.path

This should give you a way to use your code without breaking Red Hat distribution.

I hope this helps,
/Ihar

Comment 3 Midokura 2014-08-20 01:54:06 UTC
Thank you Ihar for your response. 

We'll package the downstream plugin to install in a different module, e.g. something like (midonet.neutron.plugin) as you suggested. 

Actually, we thought about that before filing this ticket, but thought installing plugin to the standard location (neutron.plugins.midonet), would be less confusing for users since they don't need to see 2 different modules installed. And, that's actually how ubuntu packages; they package neutron core and vendor plugins separately. 


Thanks

Comment 4 Ihar Hrachyshka 2014-08-20 08:01:53 UTC
There are other problem with packaging Python code splitted in different packages. See: https://bugzilla.redhat.com/show_bug.cgi?id=1019487 So we've decided that we don't have resources to track all runtime dependencies in third-party plugins.

Users may still be interested in running with the stock 'blessed by OpenStack' version of vendor plugin, so I think it's actually good that we'll have both versions available for our users.

I hope this clarifies our decision to ship all the code in one package, and how to handle third-party packages. I'm closing the bug as NOTABUG.

Cheers.