Looks like a race between ipv6 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 reveals 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:
Looks like a race between ipv6 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 reveals 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-e56f058880 5c - - - - -] Update dhcp port {u'port': {u'network_id': u'29d6752b- 027a-4eb9- aa73-711eff1b58 ca', 'binding:host_id': u'node- 2.test. domain. local', u'fixed_ips': [{u'subnet_id': u'3f81f975- 5718-4bdc- 878c-614f22b1b7 83', u'ip_address': u'192.168.100.2'}, {u'subnet_id': u'8363ac60- c30d-43dc- a1d1-3d39820602 fd'}]}, 'id': u'2e3a5343- a995-498a- 85d2-db686d119f ab'}
Server ignores ipv6 auto-address subnets in this request - to be fixed. This should be handled as in case 3, see proposed patch below.