Error in deleting IP on Openstack

asked 2018-03-14 11:30:12 -0600

David2018 gravatar image

I have been unable to delete an IP with below error, please advise:

[wrsroot@controller-0 ~(keystone_admin)]$ neutron port-delete 145476aa-c692-42c9-a750-11a711ed063e Port 145476aa-c692-42c9-a750-11a711ed063e cannot be deleted directly via the port API: has device owner network:floatingip_agent_gateway

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2018-03-16 03:29:28 -0600

David2018 gravatar image

Managed to delete this port: first check the device owner for the port using neutron port-list then confirm the device owner using neutron port-list -c device_owner -c network_id then change the device owner to "none" neutron port-update 145476aa-c692-42c9-a750-11a711ed063e --device-owner none the delete the port neutron port-delete PORT

edit flag offensive delete link more


Nice! I didn't have to deal with such an issue yet, but I'll keep that in mind! :-)

eblock gravatar imageeblock ( 2018-03-16 04:52:17 -0600 )edit

answered 2018-03-15 04:11:37 -0600

eblock gravatar image

The port is probably still attached to a router as its gateway, or something similar. You have to remove all interfaces from that router before you can delete the port. If you do it in horizon dashboard, go to "Project" --> "Network" --> "Routers" and check the "Interfaces" tab of your router. You should see something like "External gateway", click on "Delete Interface". If this is not the issue, please update the question.

edit flag offensive delete link more


All the routers have been deleted. From horizon, the attached device for this port is network:floatingip_agent_gateway.

David2018 gravatar imageDavid2018 ( 2018-03-15 06:25:36 -0600 )edit

Have you released all Floating IP's from all projects?

rlpple gravatar imagerlpple ( 2018-03-15 15:20:44 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-03-14 11:30:12 -0600

Seen: 521 times

Last updated: Mar 16 '18