OpenStack Networking (Neutron)
Go to file
Arjun Baindur f2111e0354 Do not release DHCP lease when no client ID is set on port
The DHCP agent has a really strict enforcement of client ID, which
is part of the DHCP extra options. If a VM advertises a client ID,
DHCP agent will automatically release it's lease whenever *any* other
port is updated/deleted, even if no client ID is set on the port,
because it thinks the client ID has changed.

When reload_allocations() is called, the DHCP agent parses the leases
and hosts files, and gets the list of all the ports in the network from the
DB, computing 3 different sets. The set from the leases file (v4_leases)
could have a client ID, but the set from the port DB and hosts file will
have None.

As a result, the set subtraction does not filter out the entry,
and all ports that have an active lease with a client ID are released.

The Client ID should only be enforced and leases released
if it's actually set in the port DB's DHCP extra Opts.
In that case it means someone knows what they are doing,
and we want to check for a mismatch. If the client ID on a port is
empty, it should not be treated like an unused lease.

We can't expect end users that just create VMs with auto created ports
to know/care about DHCP client IDs, then manually update ports or
change app templates.

In some cases, like Windows VMs, the client ID is advertised as the MAC by default.
In fact, there is a Windows bug which prevents you from even turning this off:
https://support.microsoft.com/en-us/help/3004537/dhcp-client-always-includes-option-61-in-the-dhcp-request-in-windows-8

Linux VMs don't have this on by default, but it may be enabled
in some templates unknown to users.

Change-Id: I8021f740bd78e654915337bd3287b45b2c422e95
Closes-Bug: #1806770
2019-01-30 18:24:06 -05:00
api-ref Fix some typos 2016-06-28 22:46:19 +02:00
bin Use os-xenapi for neutron when XenServer as hypervisor 2017-03-30 18:33:37 +00:00
devstack [L3][QoS] Agent side router gateway IP rate limit 2018-12-01 17:45:47 +08:00
doc Remove extra spaces in admin config files 2019-01-25 17:15:37 -05:00
etc Rename README.policy.json.txt 2019-01-07 12:45:15 -05:00
neutron Do not release DHCP lease when no client ID is set on port 2019-01-30 18:24:06 -05:00
playbooks/legacy Migrate neutron-tempest-linuxbridge job to zuulv3 and python 3 2019-01-17 20:07:33 +00:00
rally-jobs rally-jobs: Set floating network as a parameter 2018-12-17 16:31:10 +02:00
releasenotes Add a new configuration parameter rpc_response_max_timeout 2019-01-18 09:55:31 +00:00
tools Merge "Remove unnecessary 'set -x' at EOL in genconfig script" 2018-12-15 14:09:19 +00:00
.coveragerc Cleanup coverage configuration 2016-10-17 17:06:19 +05:30
.gitignore doc: Add policy reference 2018-12-20 14:19:40 +09:00
.gitreview Fix .gitreview to not point at a branch 2015-08-17 13:51:51 -06:00
.mailmap Add mailmap entry 2014-05-16 13:40:04 -04:00
.pylintrc Disable some pylint checks 2018-10-03 08:41:56 +00:00
.stestr.conf Fix post gate hook to accommodate for new os-testr 2017-09-12 14:20:12 -06:00
.zuul.yaml Use renamed template 'integrated-gate-py3' 2019-01-25 08:47:34 +00:00
CONTRIBUTING.rst Update link for contribution 2017-08-31 16:44:51 +02:00
HACKING.rst Update the documentation link for doc migration 2017-07-22 18:46:13 +09:00
LICENSE Adding Apache Version 2.0 license file. This is the official license agreement under which Quantum code is available to 2011-08-08 12:31:04 -07:00
README.rst Update mailinglist from dev to discuss 2018-12-12 12:44:12 +08:00
TESTING.rst doc: Small clearances for fullstack testing 2018-09-05 09:40:07 +02:00
babel.cfg Use babel to generate translation file 2013-01-24 00:20:32 +08:00
bindep.txt Add libffi-dev to bindep.txt 2017-06-13 19:26:49 +00:00
lower-constraints.txt bump neutron-lib to 1.22.0 2019-01-24 14:27:56 +00:00
requirements.txt bump neutron-lib to 1.22.0 2019-01-24 14:27:56 +00:00
setup.cfg Merge "Upgrade check command - add support for 3rd party checks" 2018-12-19 12:50:19 +00:00
setup.py Updated from global requirements 2017-03-04 11:19:58 +00:00
test-requirements.txt Upgrade pylint to a version that works with python3 2018-10-04 18:03:25 +00:00
tox.ini Merge "tox: Hide deprecation warnings from distgit" 2018-12-20 17:03:42 +00:00

README.rst

Team and repository tags

image

Welcome!

To learn more about neutron:

Get in touch via email. Use [Neutron] in your subject.

To learn how to contribute:

CONTRIBUTING.rst