jkoelker / quark

This is my fork, Quark is now at https://github.com/rackerlabs/quark
Apache License 2.0
0 stars 2 forks source link

Fixes #169 #179

Closed MattDietz closed 11 years ago

MattDietz commented 11 years ago

We were unnecessarily checking whether or not an IP was actually allocated in the subnet_find_allocation_count check. The reality is we only care if the IP has been generated before, not whether or not it's actually been allocated. The reason is by the time check the counts in the database, we've already failed our attempt to reallocate from one of the subnets. If we assume that no IPs are available for reallocation, the next step is finding a subnet we can generate a new IP address in.

MattDietz commented 11 years ago

The more I think about it, it'd be nice to have some pedantic checking. I'm going to close this and redo it to be more annoying about it