]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
dhcp: move dnsmasq version check to sanity_check
authorIhar Hrachyshka <ihrachys@redhat.com>
Tue, 20 Jan 2015 14:18:36 +0000 (15:18 +0100)
committerIhar Hrachyshka <ihrachys@redhat.com>
Mon, 26 Jan 2015 15:56:59 +0000 (16:56 +0100)
commit332204fec7e96339947aa662b25adc9925609c4f
treeba33063bdb746a647f0918017da7b0c8dc3139d8
parent51fcac038954b537d552a4cb37aca1c797c06255
dhcp: move dnsmasq version check to sanity_check

We should avoid checking version numbers in runtime. In that way, we may
break some existing setups by minimal version bumps that are often not
critical for operation. One example is a recent version bump to support
IPv6 DHCP stateful address assignment mode. Even though old dnsmasq
version made this particular mode to fail to assign addresses to
instances, other IPv6 modes, and, even more importantly, all IPv4
networks continued to operate with no issues.

So let's move the fatal check from DHCP agent into sanity_check tool to
avoid potential breakages on neutron update.

In ideal world, we would make the check smarter. Since current version
cap is due to missing hwaddr matching for IPv6 clients for old dnsmasq
versions, we could preconfigure and start up dnsmasq server in a
namespace, and request a IPv6 lease from it. That would require a DHCP
IPv6 client installed though, and I'm not sure we can always expect it
to be present, so leaving it as-is for now.

Since DHCP drivers are pluggable, we cannot drop check_version method
from DhcpBase to support other drivers that may live in the wild.

Note: we could mark the method as deprecated if we really want to get
rid of it.

Closes-Bug: #1412818
Change-Id: I7a75cccf3880d3b18005ae0def5a17dfd8a00182
neutron/agent/linux/dhcp.py
neutron/cmd/sanity/checks.py
neutron/cmd/sanity_check.py
neutron/tests/functional/sanity/test_sanity.py
neutron/tests/unit/test_dhcp_agent.py
neutron/tests/unit/test_linux_dhcp.py