neutron/neutron
Nir Magnezi 0a4596aa20 Adds an option to skip ports on ovs_cleanup
In some cases we would want to refrain from cleaning up specific
openvswitch ports.

In Octavia, the health manager service is using a predefined[1]
openvswitch port which will gets nuked by the ovs_cleanup script in the
boot process.

That port is created by the operating system NIC configuration file
(by using OVS_EXTRA[2]), but due to the order of actions in the boot
process, the ovs_cleanup script gets invoked by systemd only at a later
stage. As a result the port will be deleted each time and the Octavia
health manager service will fail to bind.

This patch takes advantage of the 'external_ids' column that already
exists for ovs ports, in order to filter out ports we would like to
skip. We filter those ports by adding 'skip_cleanup' to the
'external_ids' column.

It is important to note that this will work if we append the following
to the port: -- set Interface o-hm0 external_ids:skip_cleanup=true"

Related-Bug: #1685223

[1] http://git.openstack.org/cgit/openstack/octavia/tree/devstack/plugin.sh?h=stable/ocata#n190
[2] https://github.com/osrg/openvswitch/blob/master/rhel/README.RHEL#L102

Change-Id: If483d0ee027596999370ab0d21b1743d4ef16acb
2017-05-10 12:37:38 +03:00
..
agent Adds an option to skip ports on ovs_cleanup 2017-05-10 12:37:38 +03:00
api use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
callbacks remove and shim callbacks 2017-04-24 14:43:38 -06:00
cmd Adds an option to skip ports on ovs_cleanup 2017-05-10 12:37:38 +03:00
common Merge "Monkey patch the os and thread modules on Windows" 2017-04-27 20:06:17 +00:00
conf Use HostAddressOpt for opts that accept IP and hostnames 2017-04-20 07:24:31 -04:00
core_extensions Adopt neutron-lib plugin directory 2016-11-23 04:45:33 -07:00
db Merge "Move _get_marker_obj() out of CommonDbMixin." 2017-05-05 04:42:15 +00:00
debug use neutron_lib's portbindings api-def 2017-03-31 09:16:22 -06:00
extensions Merge "Add QoS bandwidth limit for instance ingress traffic" 2017-05-01 11:20:39 +00:00
hacking Switch to neutron-lib hacking factory 2017-04-13 07:41:25 -07:00
ipam New enginefacade for networks, subnets. 2017-03-30 01:26:45 -07:00
locale Imported Translations from Zanata 2016-08-19 07:27:43 +00:00
notifiers use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
objects Merge "Add QoS bandwidth limit for instance ingress traffic" 2017-05-01 11:20:39 +00:00
pecan_wsgi use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
plugins Adds an option to skip ports on ovs_cleanup 2017-05-10 12:37:38 +03:00
privileged Do not raise an error deleting neighbour entry 2017-01-26 16:22:20 -05:00
quota Use new enginefacade for quota and provisioning blocks 2017-03-29 14:31:03 +00:00
scheduler Refactor L3 scheduler (unify code paths) 2017-01-26 23:05:06 +00:00
server Expose neutron api application as a wsgi script 2017-04-17 02:07:27 +00:00
services Merge "Change list of available qos rules" 2017-05-04 09:34:39 +00:00
tests Adds an option to skip ports on ovs_cleanup 2017-05-10 12:37:38 +03:00
__init__.py Hacking rule to check i18n usage 2016-03-30 21:28:37 -04:00
_i18n.py Move i18n to _i18n, as per oslo_i18n guidelines 2015-12-01 19:29:10 -07:00
auth.py Use oslo.context class method to construct context object 2017-03-23 09:02:46 +00:00
manager.py Use is_loaded in manager.init 2017-03-30 14:53:20 +00:00
neutron_plugin_base_v2.py Revert "Revert "Remove threading before process forking"" 2016-06-02 21:26:08 +00:00
opts.py Remove deprecated support for QoS notification_drivers 2017-04-17 06:32:01 -07:00
policy.py Merge "Neutron server was not compatible with member actions" 2017-04-21 06:28:39 +00:00
service.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
version.py
worker.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
wsgi.py Merge "Pass parameters when create eventlet.wsgi server" 2017-04-17 05:35:54 +00:00