From ae7eb2429648bfe2b27409550e80c0e833804b52 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Wed, 22 Feb 2017 14:36:17 +0000 Subject: [PATCH] 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 --- doc/source/devref/effective_neutron.rst | 6 ++++++ neutron/cmd/sanity_check.py | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/source/devref/effective_neutron.rst b/doc/source/devref/effective_neutron.rst index ea977dd9b97..e3ca9353bbe 100644 --- a/doc/source/devref/effective_neutron.rst +++ b/doc/source/devref/effective_neutron.rst @@ -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 `_. +* 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 ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/neutron/cmd/sanity_check.py b/neutron/cmd/sanity_check.py index ef1e5cfd9b1..a03897778d6 100644 --- a/neutron/cmd/sanity_check.py +++ b/neutron/cmd/sanity_check.py @@ -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: