neutron/neutron/cmd
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
..
eventlet Merge "Switch ns-metadata-proxy to haproxy" 2017-03-14 17:32:13 +00:00
sanity Add sanity check for conntrack 2017-04-11 13:33:01 +00:00
__init__.py Fix logging error for Guru Meditation Report 2016-02-08 16:52:17 -08:00
ipset_cleanup.py Refactoring config options for cmd 2016-07-31 04:37:29 +00:00
keepalived_state_change.py Replace keepalived notifier bash script with Python ip monitor 2015-03-18 18:59:33 -04:00
linuxbridge_cleanup.py neutron-lib: start using neutron-lib helpers 2016-10-10 01:30:26 -07:00
netns_cleanup.py ip_lib: ignore gre and lo devices in get_devices by default 2017-04-13 15:03:06 -07:00
ovs_cleanup.py Adds an option to skip ports on ovs_cleanup 2017-05-10 12:37:38 +03:00
pd_notify.py neutron-lib: use replace_file from neutron lib 2016-11-07 09:18:41 +00:00
runtime_checks.py Move dhcp_release6_supported to runtime checks file 2017-02-15 16:29:01 -06:00
sanity_check.py Merge "sanity check: deprecate all version based checks" 2017-04-19 05:33:54 +00:00