sanity check: deprecate all version based checks

Those are against the spirit of the tool, and were introduced by
mistake. Sanity checks should validate actual features not version
numbers, because distributions can ship an older version of a package
that still has the needed patches backported to support features needed
for neutron; in which case the sanity check tool should not fail on
those deployments.

Updated 'effective neutron' guide to reflect the unspoken rule.

Since the tool is supposed to be consumed by operators, and not (just)
developers, we can't remove those CLI arguments immediately, and so we
follow deprecation process instead. In Queens, we will completely remove
those checks and options.

Change-Id: I2df8b7b39bca6d548a6f17466c26ffa688eb1d59
This commit is contained in:
Ihar Hrachyshka 2017-02-22 14:36:17 +00:00
parent d46636112f
commit ae7eb24296
2 changed files with 12 additions and 4 deletions

View File

@ -216,6 +216,12 @@ and interacting with linux utils.
visibility (as these patches are brought up to the attention of the core team
during team meetings). More details in `review guidelines
<http://docs.openstack.org/developer/neutron/policies/code-reviews.html#neutron-spec-review-practices>`_.
* When a patch or the code depends on a new feature in the kernel or in any platform tools
(dnsmasq, ip, Open vSwitch etc.), consider introducing a new sanity check to
validate deployments for the expected features. Note that sanity checks *must
not* check for version numbers of underlying platform tools because
distributions may decide to backport needed features into older versions.
Instead, sanity checks should validate actual features by attempting to use them.
Eventlet concurrent model
~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -297,7 +297,9 @@ OPTS = [
BoolOptCallback('read_netns', check_read_netns,
help=_('Check netns permission settings')),
BoolOptCallback('dnsmasq_version', check_dnsmasq_version,
help=_('Check minimal dnsmasq version')),
help=_('Check minimal dnsmasq version'),
deprecated_for_removal=True,
deprecated_since='Pike'),
BoolOptCallback('ovsdb_native', check_ovsdb_native,
help=_('Check ovsdb native interface support')),
BoolOptCallback('ovs_conntrack', check_ovs_conntrack,
@ -307,7 +309,9 @@ OPTS = [
BoolOptCallback('keepalived_ipv6_support', check_keepalived_ipv6_support,
help=_('Check keepalived IPv6 support')),
BoolOptCallback('dibbler_version', check_dibbler_version,
help=_('Check minimal dibbler version')),
help=_('Check minimal dibbler version'),
deprecated_for_removal=True,
deprecated_since='Pike'),
BoolOptCallback('ipset_installed', check_ipset,
help=_('Check ipset installation')),
BoolOptCallback('ip6tables_installed', check_ip6tables,
@ -352,8 +356,6 @@ def enable_tests_from_config():
cfg.CONF.set_default('icmpv6_header_match', True)
if not cfg.CONF.AGENT.use_helper_for_ns_read:
cfg.CONF.set_default('read_netns', True)
if cfg.CONF.dhcp_driver == 'neutron.agent.linux.dhcp.Dnsmasq':
cfg.CONF.set_default('dnsmasq_version', True)
if cfg.CONF.OVS.ovsdb_interface == 'native':
cfg.CONF.set_default('ovsdb_native', True)
if cfg.CONF.l3_ha: