Ask Your Question
0

how to know whether the orphan ip address which neutron.delete_floatingip can be allocated again in another project?

asked 2016-07-05 05:04:23 -0500

genie gravatar image

after created project and instance and associate floating ip and then delete project,

then run a script to delete orphan floating ip , but in another project allocated ip address are N+1 new ip address

how to know whether the orphan ip address which neutron.delete_floatingip can be allocated again in another project?

 except:
   print(("Deleting floatingip %s - %s") % (floatingip['id'], floatingip['floating_ip_address']))
   neutron_client.delete_floatingip(floatingip['id'])

i have thought to manually associate the deleted orphan floating ip address with another project,

but i do not know port_id, what is port_id? and is it possible to associate it manually in this case and how to do?

floating ip 
28b2fba4-f6d3-4265-9969-e71f58288dcc

check with net-list and find existing network called network2b

neutron net-list
export public_id=db9791fb-f06e-496f-9168-5c2cd0ab1292

export floatingip_id=28b2fba4-f6d3-4265-9969-e71f58288dcc

neutron floatingip-associate $floatingip_id $port_id
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-07-05 22:43:36 -0500

james-denton gravatar image

If you list floating IPs, either through the API or neutron floatingip-list, and the IP does not show up as being allocated or unallocated, then it should be available for another tenant upon a floatingip-create action.

If floating IPs are orphaned after deleting a project, they will still be associated with the newly-deleted tenant-id and can be deleted by the admin via neutron floatingip-delete.

Hope that helps.

edit flag offensive delete link more

Comments

finally, we use command to allocate floating ip many times until the previous deleted orphan floating ip appear again.

genie gravatar imagegenie ( 2016-07-14 04:53:15 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-07-05 05:04:23 -0500

Seen: 167 times

Last updated: Jul 05 '16