Unable to delete neutron port [closed]

asked 2015-02-07 21:42:22 -0500

updated 2015-02-08 19:50:11 -0500

Hi All,

I have a requirement to delete port (neutron port-delete) which are establish on my Base network(public) on neutron server.. These port are unused port on my network but in message it shows are active.. The error I am getting in below last command.. Please assist me to delete these port so that I can restructure my network infrastructure...

neutron net-list
+--------------------------------------+--------+-----------------------------------------------------+
| id                                   | name   | subnets                                             |
+--------------------------------------+--------+-----------------------------------------------------+
| 6cb33f9a-4a59-4599-b124-6e95181cc91a | public | d190e706-42f8-4b48-9d19-d66f53f96a3c 192.168.2.0/24 |
+--------------------------------------+--------+-----------------------------------------------------+

neutron subnet-list
+--------------------------------------+---------------+----------------+----------------------------------------------------+
| id                                   | name          | cidr           | allocation_pools                                   |
+--------------------------------------+---------------+----------------+----------------------------------------------------+
| d190e706-42f8-4b48-9d19-d66f53f96a3c | public_subnet | 192.168.2.0/24 | {"start": "192.168.2.220", "end": "192.168.2.230"} |
+--------------------------------------+---------------+----------------+----------------------------------------------------+

neutron port-list
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                            |
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+
| 08d622a1-cf15-42ed-9241-1500b0af3212 |      | fa:16:3e:46:26:f9 | {"subnet_id": "d190e706-42f8-4b48-9d19-d66f53f96a3c", "ip_address": "192.168.2.225"} |
| 745b57a7-2352-4b8f-a4a9-e6f018641ee5 |      | fa:16:3e:4b:4a:c3 | {"subnet_id": "d190e706-42f8-4b48-9d19-d66f53f96a3c", "ip_address": "192.168.2.228"} |
+--------------------------------------+------+-------------------+--------------------------------------------------------------------------------------+

neutron port-show 08d622a1-cf15-42ed-9241-1500b0af3212
+-----------------------+--------------------------------------------------------------------------------------+
| Field                 | Value                                                                                |
+-----------------------+--------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                 |
| allowed_address_pairs |                                                                                      |
| binding:host_id       |                                                                                      |
| binding:profile       | {}                                                                                   |
| binding:vif_details   | {}                                                                                   |
| binding:vif_type      | unbound                                                                              |
| binding:vnic_type     | normal                                                                               |
| device_id             | e706b972-4259-45df-8e3a-8024e1b0135b                                                 |
| device_owner          | network:floatingip                                                                   |
| extra_dhcp_opts       |                                                                                      |
| fixed_ips             | {"subnet_id": "d190e706-42f8-4b48-9d19-d66f53f96a3c", "ip_address": "192.168.2.225"} |
| id                    | 08d622a1-cf15-42ed-9241-1500b0af3212                                                 |
| mac_address           | fa:16:3e:46:26:f9                                                                    |
| name                  |                                                                                      |
| network_id            | 6cb33f9a-4a59-4599-b124-6e95181cc91a                                                 |
| security_groups       |                                                                                      |
| status                | DOWN                                                                                 |
| tenant_id             |                                                                                      |
+-----------------------+--------------------------------------------------------------------------------------+

neutron port-delete 08d622a1-cf15-42ed-9241-1500b0af3212
409-{u'NeutronError': {u'message': u'Port 08d622a1-cf15-42ed-9241-1500b0af3212 has owner network:floatingip and therefore cannot be deleted directly via the port API.', u'type': u'L3PortInUse', u'detail': u''}}
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Pradipta_OS_M
close date 2015-02-12 12:22:18.184380

Comments

From the error, it looks like this port is associated with a floating ip. What if you delete the floating ip first?

larsks gravatar imagelarsks ( 2015-02-07 22:14:57 -0500 )edit

Yes, Please advise me which command should I run to delete these floating IPs and its associated port...

Pradipta_OS_M gravatar imagePradipta_OS_M ( 2015-02-08 03:49:19 -0500 )edit

Hi Pradita, use below command for delete floating ip.

neutron floatingip-list neutron floatingip-delete FLOATING_IP_ID

if any issue, try it with all your keystonerc

hk gravatar imagehk ( 2016-07-18 22:28:52 -0500 )edit