Public bug reported: There might be race between ipv6 auto-address subnet create and network dhcp port create.
Neutron server adds an ipv6 address to a dhcp port in two cases: 1) network already has ipv6 subnet by the time dhcp agent requests dhcp port creation - in this case agent includes both subnets into requested IPs of the port and both get allocated; 2) ipv6 subnet is created after the network already has dhcp port existing - ipv6 IP then gets allocated on the dhcp port as part of subnet creation on the server side; The bug is with the third case: 3) ipv6 subnet and dhcp port are created at the same time: so no ipv6 IP is requested for dhcp port by dhcp agent, as well as no ipv6 address is added to dhcp port as part of subnet creation; In this case dhcp agent tries to reprocess network after subnet/port creation and updates IPs on the dhcp port: 2017-03-30 05:12:38.990 29848 DEBUG neutron.api.rpc.handlers.dhcp_rpc [req-bcd62396-0e9a-4f39-8bf7-e56f0588805c - - - - -] Update dhcp port {u'port': {u'network_id': u'29d6752b-027a-4eb9-aa73-711eff1b58ca', 'binding:host_id': u'node-2.test.domain.local', u'fixed_ips': [{u'subnet_id': u'3f81f975-5718-4bdc-878c-614f22b1b783', u'ip_address': u'192.168.100.2'}, {u'subnet_id': u'8363ac60-c30d-43dc- a1d1-3d39820602fd'}]}, 'id': u'2e3a5343-a995-498a-85d2-db686d119fab'} Server ignores ipv6 auto-address subnets in this request. So agent says: 2017-03-24 01:51:41.661 28865 DEBUG neutron.agent.linux.dhcp [req-16627de0-3069-4aa8-bfe1-3db559811c53 - - - - -] Requested DHCP port with IPs on subnets set([u'f22021f4-c876-4d94-be93-d24ccb6b0e31', u'869f4abf-c440-4b65-a9be-074776fadaf1']) but only got IPs on subnets set([u'869f4abf-c440-4b65-a9be-074776fadaf1']) ... 2017-03-24 01:51:41.775 28865 DEBUG neutron.agent.dhcp.agent [req-16627de0-3069-4aa8-bfe1-3db559811c53 - - - - -] Error configuring DHCP port, scheduling resync: Subnet on port 798cefef-c4c1-482e-bbc0-acea52e6490d does not match the requested subnet f22021f4-c876-4d94-be93-d24ccb6b0e31. call_driver /usr/lib/python2.7/dist-packages/neutron/agent/dhcp/agent.py:124 DHCP agent keeps trying, dhcp doesn't work. ** Affects: neutron Importance: High Assignee: Oleg Bondarev (obondarev) Status: New ** Tags: l3-ipam-dhcp -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1678104 Title: DHCP may not work on a dualstack network Status in neutron: New Bug description: There might be race between ipv6 auto-address subnet create and network dhcp port create. Neutron server adds an ipv6 address to a dhcp port in two cases: 1) network already has ipv6 subnet by the time dhcp agent requests dhcp port creation - in this case agent includes both subnets into requested IPs of the port and both get allocated; 2) ipv6 subnet is created after the network already has dhcp port existing - ipv6 IP then gets allocated on the dhcp port as part of subnet creation on the server side; The bug is with the third case: 3) ipv6 subnet and dhcp port are created at the same time: so no ipv6 IP is requested for dhcp port by dhcp agent, as well as no ipv6 address is added to dhcp port as part of subnet creation; In this case dhcp agent tries to reprocess network after subnet/port creation and updates IPs on the dhcp port: 2017-03-30 05:12:38.990 29848 DEBUG neutron.api.rpc.handlers.dhcp_rpc [req-bcd62396-0e9a-4f39-8bf7-e56f0588805c - - - - -] Update dhcp port {u'port': {u'network_id': u'29d6752b-027a-4eb9-aa73-711eff1b58ca', 'binding:host_id': u'node-2.test.domain.local', u'fixed_ips': [{u'subnet_id': u'3f81f975-5718-4bdc-878c-614f22b1b783', u'ip_address': u'192.168.100.2'}, {u'subnet_id': u'8363ac60-c30d-43dc- a1d1-3d39820602fd'}]}, 'id': u'2e3a5343-a995-498a-85d2-db686d119fab'} Server ignores ipv6 auto-address subnets in this request. So agent says: 2017-03-24 01:51:41.661 28865 DEBUG neutron.agent.linux.dhcp [req-16627de0-3069-4aa8-bfe1-3db559811c53 - - - - -] Requested DHCP port with IPs on subnets set([u'f22021f4-c876-4d94-be93-d24ccb6b0e31', u'869f4abf-c440-4b65-a9be-074776fadaf1']) but only got IPs on subnets set([u'869f4abf-c440-4b65-a9be-074776fadaf1']) ... 2017-03-24 01:51:41.775 28865 DEBUG neutron.agent.dhcp.agent [req-16627de0-3069-4aa8-bfe1-3db559811c53 - - - - -] Error configuring DHCP port, scheduling resync: Subnet on port 798cefef-c4c1-482e-bbc0-acea52e6490d does not match the requested subnet f22021f4-c876-4d94-be93-d24ccb6b0e31. call_driver /usr/lib/python2.7/dist-packages/neutron/agent/dhcp/agent.py:124 DHCP agent keeps trying, dhcp doesn't work. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1678104/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp