Formerly if we tried to create many millions of floating IPs with a
range like "192.168.2.224/2", address_to_hosts would happily iterate
over all of them (which would take a long time) and then nova-manage
would eventually crash with an OutOfMemoryError when we tried putting
all of them in a list. Or, if the initial list wasn't quite big
enough to use all memory, it would blow up later (even more slowly)
when we tried to put them in the database via SQLAlchemy.
Now, raise exception.InvalidInput if the number of IPs is a million
or more. (A million is erring on the side of caution.)
Change-Id: Ifc6b6a8faadc2e97e09f9f6c975e52229f705789
(cherry picked from commit 34de8d1529fb9a2e7fad096a6967b9a483ab0cb0)
Reviewed: https:/ /review. openstack. org/27854 github. com/openstack/ nova/commit/ df5d13c29eae64d 9c6340aa1cd54de 7b3d9b2dcb
Committed: http://
Submitter: Jenkins
Branch: stable/grizzly
commit df5d13c29eae64d 9c6340aa1cd54de 7b3d9b2dcb
Author: David Ripton <email address hidden>
Date: Tue Apr 2 12:19:17 2013 -0400
Raise rather than generating millions of IPs.
Fixes bug #1163394
Formerly if we tried to create many millions of floating IPs with a
range like "192.168.2.224/2", address_to_hosts would happily iterate
over all of them (which would take a long time) and then nova-manage
would eventually crash with an OutOfMemoryError when we tried putting
all of them in a list. Or, if the initial list wasn't quite big
enough to use all memory, it would blow up later (even more slowly)
when we tried to put them in the database via SQLAlchemy.
Now, raise exception. InvalidInput if the number of IPs is a million
or more. (A million is erring on the side of caution.)
Change-Id: Ifc6b6a8faadc2e 97e09f9f6c975e5 2229f705789 e7fad096a6967b9 a483ab0cb0)
(cherry picked from commit 34de8d1529fb9a2