yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #50982
[Bug 1581220] Re: race leads same floating ip to be associated to separate ports
As Kevin pointed out and as I also can see from code [1] (both for
methods _add_auto_ip and _add_ip_from_pool) the action of associating a
floating ip to server is a two step process that involve creating an
unassociated FIP which then gets assigned to a fixed ip via its port
uuid (neutron case). It seems that the race part is where two separate
threads get hold of the same FIP uuid: that can happen into cases (as
far as I can see): a) pull a FIP from a list of available ones; b)
create a fresh one.
I wonder if the source of contention is in the a) code path, and whether
there's a chance to protect this critical region on client-side. Two
separate client requests should lead to two separate FIPs being
generated and thus lead to separate associations and thus no contention.
[1] https://github.com/openstack-infra/shade/blob/d026cab5c7548517aa15e969fdd336b9fc663e7d/shade/openstackcloud.py#L3955
[2] https://github.com/openstack-infra/shade/blob/d026cab5c7548517aa15e969fdd336b9fc663e7d/shade/openstackcloud.py#L3296
[3] https://github.com/openstack-infra/shade/blob/d026cab5c7548517aa15e969fdd336b9fc663e7d/shade/openstackcloud.py#L3304
** No longer affects: nova
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1581220
Title:
race leads same floating ip to be associated to separate ports
Status in neutron:
Incomplete
Bug description:
It looks like steps to create server as outlined in [2] lead to the
same FIP being associated to two individual ports [1] (offending fip
f1169479-7d88-4526-a60a-82f18b617077). It looks like two interleaving
calls to do FIP association by port-id will end up clashing. This has
been reproduced in Kilo, but we would need to find out if the race is
still possible in newer versions.
[1] https://gist.github.com/cloudnull/d90eff7efc524844d8d3504fea8fa419
[2] https://gist.github.com/cloudnull/2f3931e51062dc7b325faf9a24974006
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1581220/+subscriptions
References