neutron/neutron/agent/linux
Gaudenz Steinlin 6bc1c00d66 Copy existing IPv6 leases to generated lease file
Because the DHCP agent does not know the IAID (identity association
identifier) of assigned IPv6 addresses it's not possible to generate the
lease file including IPv6 leases. Because of this IPv6 addresses are
excluded when generating the lease file in case of DHCP agent restarts.
This causes DHCPv6 clients to fail to RENEW their lease and to go
through a full address discovery cycle with possible short connectivity
disruption.

This commit copies the existing IPv6 leaes from an already existing
lease file if present. While this does not allow for DHCP agent
failover, this is still better than just skipping the IPv6 addresses.

A lease file without the IPv6 addresses is still generated if an agent
is migrated to a different host.

This commit complements the fix implemented in
Ib1b2f284ab81f1c4af7b08b5257b45a3f6e79c3e which just skips the IPv6
leases as otherwise the lease file would be invalid and all leases would
be lost. It does not change the behavior for still valid IPv4 leases.

With this issue fixed an additional fix is required to not loose DHCPv6
leases when the agent restarts dnsmasq. Currently the DHCP agent
regenerates all configuration files on restart. This means that DHCPv6
leases are lost as they can't be regenerated. This changes the agent to
only delete the config files if the agent's ports are also removed.

Closes-Bug: #1722126
Related-Change: Ib1b2f284ab81f1c4af7b08b5257b45a3f6e79c3e

Change-Id: I40761b30563749251b9d74731bbe7a80a124da89
2021-06-24 22:42:09 +02:00
..
openvswitch_firewall [ovs fw] Restrict IPv6 NA and DHCP(v6) IP and MAC source addresses 2021-04-13 15:15:41 +02:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
bridge_lib.py Disable pep8 import check for pyroute2 library 2021-06-03 20:06:44 +00:00
daemon.py Remove "six" library 2020-07-28 16:55:52 +00:00
dhcp.py Copy existing IPv6 leases to generated lease file 2021-06-24 22:42:09 +02:00
dibbler.py Remove "six" library 2020-07-28 16:55:52 +00:00
external_process.py Always use absolute path for custom kill-scripts 2021-04-09 15:28:41 +02:00
interface.py Disable pep8 import check for pyroute2 library 2021-06-03 20:06:44 +00:00
ip_conntrack.py Merge "Remove rootwrap execution (5)" 2021-02-25 20:47:55 +00:00
ip_lib.py Disable pep8 import check for pyroute2 library 2021-06-03 20:06:44 +00:00
ipset_manager.py Remove rootwrap execution (5) 2021-02-19 08:47:17 +00:00
iptables_comments.py Iptables firewall driver adds forward rules for trusted ports 2018-03-06 10:13:44 +01:00
iptables_firewall.py Fix "_get_sg_members" method 2021-04-06 12:54:26 +00:00
iptables_manager.py Remove rootwrap execution (4) 2021-02-08 10:05:51 +00:00
keepalived.py Revert "Implement "kill" method using os.kill()" 2021-03-25 22:05:58 +00:00
l3_tc_lib.py Remove rootwrap execution (1) 2021-02-06 16:22:43 +00:00
of_monitor.py OpenFlow monitor 2019-11-20 18:00:13 +00:00
pd.py Merge "Improve terminology in the Neutron tree" 2020-08-28 14:06:18 +00:00
pd_driver.py Remove usage of six.add_metaclass 2020-05-21 14:41:18 -04:00
ra.py Remove more empty lines in ipv6 ra conf. 2020-09-30 11:02:02 +08:00
tc_lib.py Disable pep8 import check for pyroute2 library 2021-06-03 20:06:44 +00:00
utils.py Revert "Implement "kill" method using os.kill()" 2021-03-25 22:05:58 +00:00