Bug 1127545 - openstack-neutron RPM package contains vendor plugin code, preventing vendors from providing their own code
Summary: openstack-neutron RPM package contains vendor plugin code, preventing vendors...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 5.0 (RHEL 6)
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: 5.0 (RHEL 7)
Assignee: Ihar Hrachyshka
QA Contact: Ofer Blaut
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-07 06:08 UTC by Midokura
Modified: 2016-04-26 13:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-20 08:01:53 UTC


Attachments (Terms of Use)

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.


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