Conversation
|
We need that as well. Please consider merging this in. |
|
running in to the same problem |
|
@hufman Sorry for letting these sit for so long. The OpenStack environments I normally test against don't support some of these features and DevStack is being annoying. A couple of questions but, otherwise, I love the idea of supporting this... The linter this project uses is unhappy about a few style things in the PR. If you have the time, would it be possible to adjust those and add RSpec tests for the new functionality? If you're busy with other things now, let me know; I should have some time I could work on it this weekend. Anyone with more experience with OpenStack's floating IPs than I (read: not a lot), what do you expect as a starting point when you want to assign a floating IP to a server? The couple people I spoke to said they'd have a pool with IPs already allocated to it, and not expect a driver like this to do the allocation for them. If falling back to assigning a new IP to the pool is the appropriate behavior, should there be a way for teardown of the server to pull it back out of the pool? Thanks! |
|
the floating ip gets assigned when the vm is up and running. and when the vm is destroyed the the floating ip gets released to the pool of the user so the user should retrieve the floating ip |
|
When I was first making this ability, it was easier to allocate a new IP address all the time. Then I had to add support to reuse the old IP addresses. I removed that section of the code, which should hopefully bring the complexity down to the required level. |
|
@ramonskie Is that specifically the feature you require, or just an observation of how others are handling floating IPs? This change allows you to provide the name of an IP pool, but not request a specific IP address. That feature can certainly be added separately, though, if people need it too. |
|
just a observation |
|
@ramonskie Cool, cool. Thank you. |
|
I don't see how else I can reduce the complexity of the attach_ip function, I have that loop in there to try to avoid any race conditions that may happen if an IP is stolen away between the time it lists the available IPs and try to allocate one. |
Our Openstack deployment does not allow access by default, so this code tells kitchen-openstack to associate a floating IP address automatically.