Ask Your Question
1

Unable to delete port

asked 2015-05-31 06:11:30 -0500

jlausuch gravatar image

This is similar to this thread https://ask.openstack.org/en/question/60423/unable-to-delete-neutron-port/ (https://ask.openstack.org/en/question...) but in this case, there isn't any floatingip associated to that port and still cannot be deleted. The port is type network:router_gateway but there is not router existing anymore (neutron router-list returns nothing).

$ neutron port-list
+--------------------------------------+-------+-------------------+--------------------------------------------------------------------------------------+
| id                                   | name  | mac_address       | fixed_ips                                                                            |
+--------------------------------------+-------+-------------------+--------------------------------------------------------------------------------------+
| 0d4cc006-7e22-465f-bab3-fc1cacc98d5d | test2 | fa:16:3e:70:6c:9e | {"subnet_id": "2eb91f84-a5c3-441b-b96e-0e275a17e24c", "ip_address": "172.30.10.156"} |
+--------------------------------------+-------+-------------------+--------------------------------------------------------------------------------------+

$ neutron port-delete 0d4cc006-7e22-465f-bab3-fc1cacc98d5d
Port 0d4cc006-7e22-465f-bab3-fc1cacc98d5d has owner network:router_gateway and therefore cannot be deleted directly via the port API.

$ neutron port-show 0d4cc006-7e22-465f-bab3-fc1cacc98d5d
+-----------------------+--------------------------------------------------------------------------------------+
| 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             | 258a02d4-75d4-44b9-bcee-53bf2f797b44                                                 |
| device_owner          | network:router_gateway                                                               |
| extra_dhcp_opts       |                                                                                      |
| fixed_ips             | {"subnet_id": "2eb91f84-a5c3-441b-b96e-0e275a17e24c", "ip_address": "172.30.10.156"} |
| id                    | 0d4cc006-7e22-465f-bab3-fc1cacc98d5d                                                 |
| mac_address           | fa:16:3e:70:6c:9e                                                                    |
| name                  | test2                                                                                |
| network_id            | e513c2ab-d49b-4f96-90b6-ad862e518cd7                                                 |
| security_groups       |                                                                                      |
| status                | DOWN                                                                                 |
| tenant_id             |                                                                                      |
+-----------------------+--------------------------------------------------------------------------------------+

$neutron router-list

$ neutron floatingip-list

$ neutron net-list
+--------------------------------------+------------------+-----------------------------------------------------+
| id                                   | name             | subnets                                             |
+--------------------------------------+------------------+-----------------------------------------------------+
| e513c2ab-d49b-4f96-90b6-ad862e518cd7 | provider_network | 2eb91f84-a5c3-441b-b96e-0e275a17e24c 172.30.10.0/24 |
+--------------------------------------+------------------+-----------------------------------------------------+

 $ neutron subnet-list
+--------------------------------------+-----------------+----------------+----------------------------------------------------+
| id                                   | name            | cidr           | allocation_pools                                   |
+--------------------------------------+-----------------+----------------+----------------------------------------------------+
| 2eb91f84-a5c3-441b-b96e-0e275a17e24c | provider_subnet | 172.30.10.0/24 | {"start": "172.30.10.150", "end": "172.30.10.200"} |
+--------------------------------------+-----------------+----------------+----------------------------------------------------+
edit retag flag offensive close merge delete

Comments

Please share the output of some mysql commands,Login to mysql. then run 2 query's and paste the output here.

#mysql -u username -p

mysql>select * from neutron.ipallocations;
mysql>select * from neutron.ports;
sunnyarora gravatar imagesunnyarora ( 2015-06-01 20:53:35 -0500 )edit
3

do neutron port-update $PORT_ID --device_owner compute:None and then try to delete port

darragh-oreilly gravatar imagedarragh-oreilly ( 2015-06-02 08:54:35 -0500 )edit

Thank You darragh-oreilly This worked for me !

cinderela gravatar imagecinderela ( 2016-09-06 04:40:51 -0500 )edit

3 answers

Sort by » oldest newest most voted
0

answered 2016-07-12 01:21:07 -0500

subhasis gravatar image

[root@sopenstack66 ~(keystone_admin)]# mysql -u root Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 30491 Server version: 10.1.12-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select * from neutron.ipallocations; +--------------------------------------+-------------+--------------------------------------+--------------------------------------+ | port_id | ip_address | subnet_id | network_id | +--------------------------------------+-------------+--------------------------------------+--------------------------------------+ | 15299146-884b-4c00-9920-5c01d1068dc2 | 12.12.12.9 | 557abd45-386e-4922-b4d3-7407c90a1524 | f31a658f-88ea-4f18-9317-2d0a1c68f08b | | 4f9f6bb4-e068-498d-acd3-422907b4e5d5 | 12.12.12.11 | 557abd45-386e-4922-b4d3-7407c90a1524 | f31a658f-88ea-4f18-9317-2d0a1c68f08b | | 855ac731-633e-413b-82d8-89c06674a647 | 12.12.12.10 | 68cecb60-313b-44b9-88a3-7677c155d5b6 | e6baf419-d3b6-443a-8573-ff35c1c61f60 | | 8c085223-034d-4617-9822-3210183befb8 | 12.12.12.7 | 557abd45-386e-4922-b4d3-7407c90a1524 | f31a658f-88ea-4f18-9317-2d0a1c68f08b | | 956b58b6-65bd-4eae-a1fe-df507665ebcd | 12.12.12.8 | 557abd45-386e-4922-b4d3-7407c90a1524 | f31a658f-88ea-4f18-9317-2d0a1c68f08b | | a7953fc9-3746-4a50-87f1-cafb9a092868 | 12.12.12.10 | 557abd45-386e-4922-b4d3-7407c90a1524 | f31a658f-88ea-4f18-9317-2d0a1c68f08b | | c710861e-0c64-4b98-a3b6-8cceb0b5ef58 | 12.12.12.3 | 68cecb60-313b-44b9-88a3-7677c155d5b6 | e6baf419-d3b6-443a-8573-ff35c1c61f60 | +--------------------------------------+-------------+--------------------------------------+--------------------------------------+ 7 rows in set (0.00 sec)

MariaDB [(none)]> select * from neutron.ports; +----------------------------------+--------------------------------------+-------+--------------------------------------+-------------------+----------------+--------+-------------------------------------------------------------------------------+--------------+----------+------------------+ | tenant_id | id | name | network_id | mac_address | admin_state_up | status | device_id | device_owner | dns_name | standard_attr_id | +----------------------------------+--------------------------------------+-------+--------------------------------------+-------------------+----------------+--------+-------------------------------------------------------------------------------+--------------+----------+------------------+ | fe0237a444084ed8948e791920c645e1 | 15299146-884b-4c00-9920-5c01d1068dc2 | p3 | f31a658f-88ea-4f18-9317-2d0a1c68f08b | fa:16:3e:94:9b:66 | 1 | ACTIVE | 058ca278-61bf-49c6-b475-8fd6918b248f | compute:nova | NULL | 1062 | | fe0237a444084ed8948e791920c645e1 | 4f9f6bb4-e068-498d-acd3-422907b4e5d5 | | f31a658f-88ea-4f18-9317-2d0a1c68f08b | fa:16:3e:89:16:20 | 1 | ACTIVE | dhcpbcbdf24c-c61a-5a76-85ba-f462388444cb-f31a658f-88ea-4f18-9317-2d0a1c68f08b | network:dhcp | NULL | 1069 | | fe0237a444084ed8948e791920c645e1 | 855ac731-633e-413b-82d8-89c06674a647 | | e6baf419-d3b6-443a-8573-ff35c1c61f60 | fa:16:3e:be:42:ad | 1 | ACTIVE | dhcpbcbdf24c-c61a-5a76-85ba-f462388444cb-e6baf419-d3b6-443a-8573-ff35c1c61f60 | network:dhcp | NULL | 1038 | | fe0237a444084ed8948e791920c645e1 | 8c085223-034d-4617-9822-3210183befb8 | p1 | f31a658f-88ea-4f18-9317-2d0a1c68f08b | fa:16:3e:01:73:a7 | 1 | ACTIVE | 13597e17-c78a-41ad-9f23-df82234ef29c | compute:nova | NULL | 1060 | | fe0237a444084ed8948e791920c645e1 | 956b58b6-65bd-4eae-a1fe-df507665ebcd | p2 | f31a658f-88ea-4f18-9317-2d0a1c68f08b | fa:16:3e:0e:b5:76 | 1 | ACTIVE | b659a6ac-9db0-435f-9369-4a22150a1a0f | compute:nova | NULL | 1061 | | fe0237a444084ed8948e791920c645e1 | a7953fc9-3746-4a50-87f1-cafb9a092868 | p4 | f31a658f-88ea-4f18-9317-2d0a1c68f08b | fa:16:3e:d5:35:e7 | 1 | DOWN | | | NULL | 1063 | | fe0237a444084ed8948e791920c645e1 | c710861e-0c64-4b98-a3b6-8cceb0b5ef58 | port1 | e6baf419-d3b6-443a-8573-ff35c1c61f60 | fa:16:3e:53:87:48 | 1 | DOWN | | compute:None | NULL | 1031 | +----------------------------------+--------------------------------------+-------+--------------------------------------+-------------------+----------------+--------+-------------------------------------------------------------------------------+--------------+----------+------------------+ 7 rows in set (0.00 sec)

MariaDB [(none)]> Ctrl-C -- exit! Aborted [root@sopenstack66 ~(keystone_admin)]# neutron port-update c710861e-0c64-4b98-a3b6-8cceb0b5ef58 --device_owner compute:None Updated port: c710861e-0c64-4b98-a3b6-8cceb0b5ef58 [root@sopenstack66 ~(keystone_admin)]# neutron port-delete c710861e-0c64-4b98-a3b6-8cceb0b5ef58 Request Failed: internal server error while processing your request. Neutron server returns request_ids: ['req-4b8c5ad2-765c-4314-8ab3-b83d8e31b614'] [root@sopenstack66 ~(keystone_admin)]# ip netns qdhcp-f31a658f-88ea-4f18-9317-2d0a1c68f08b qdhcp-e6baf419-d3b6-443a-8573-ff35c1c61f60

edit flag offensive delete link more
0

answered 2015-06-02 10:33:06 -0500

jlausuch gravatar image

Answering to all of you. I tried to update the port so the device_owner is None and then I can delete the port.

Strange, that "neutron router-list" does not show any router and Horizon either, but:

[root@oscontroller1 ~(openstack_admin)]# ip netns
qrouter-cf4bbaa6-8f2b-4116-9b68-71c08058d7b2
qrouter-9819e732-6cbc-423a-b6ca-6f2e9bafd817
qrouter-c594bde6-cd4c-42fa-ad7f-7fa86d5a18b1
qrouter-b869ad30-fb88-4ecb-93a4-56092fe45fa9
qrouter-5c51e891-a3c1-4533-863a-caff7e540987
qrouter-bdca762b-308a-4734-bab1-8d9160703a45
qrouter-10186907-d551-4c5d-9e8e-9c554a74e4c4
qrouter-da37653f-a962-4c38-841a-6069f5859375
qrouter-1ddaa4f5-5b90-4890-ab88-742bafe17520
qrouter-95adfb86-6361-4c7a-8aaf-91ebc35c1329
qrouter-05ed9163-c6d8-41d0-aa8a-4e64ee0c984e
qrouter-8a4f8c2a-528c-4527-b2f6-4afabb8e0ed8
qrouter-616f71cb-3ee5-4d0a-9af2-edd4c0c4718e
qrouter-d219f245-3fe3-454b-aa83-65c026718be7
qrouter-cb6e68e5-8602-4921-8eae-0087eef54200
qrouter-b1e89625-fb8d-4bdc-9895-2c069c812a81
qrouter-83f68bdf-2717-4e73-9325-47914a892d4e
qrouter-2ba4ff41-806a-4780-a690-e259a142e27c
qrouter-fa3f6301-5732-4b17-9946-b68b848de541
qrouter-0a9627b6-21e9-4d04-8fad-332f825c3f3b
qrouter-b1955d54-0a74-4b8a-9c4a-f1774b0cd532
qrouter-7af0ffd5-f99a-4ade-9c7c-c944936f2877
qrouter-6e55b578-568f-4cfe-b867-26bb8cbd8937
qrouter-7c3e8898-731d-4a71-a8be-b3632be53554




MariaDB [(none)]> select * from neutron.ipallocations;
+--------------------------------------+---------------+--------------------------------------+--------------------------------------+
| port_id                              | ip_address    | subnet_id                            | network_id                           |
+--------------------------------------+---------------+--------------------------------------+--------------------------------------+
| 1bfd8c5d-2ce8-47fd-afdd-ab205e992d80 | 2003::1       | 8f790f7d-2fa7-4e0e-9ebb-2f4bf21c4f94 | f01ab808-75e0-4993-8950-befb6a505a07 |
| 7f23187d-95c3-4d31-98cd-2997650ddcc0 | 2003::124     | 8f790f7d-2fa7-4e0e-9ebb-2f4bf21c4f94 | f01ab808-75e0-4993-8950-befb6a505a07 |
| d7caf61b-f946-430a-b367-274266bbee5d | 172.30.10.194 | 5f8eb000-a797-416b-8d20-3153c94a2cfe | b869ad30-fb88-4ecb-93a4-56092fe45fa9 |
+--------------------------------------+---------------+--------------------------------------+--------------------------------------+
3 rows in set (0.00 sec)

MariaDB [(none)]> select * from neutron.ports;
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+-------------------------------------------------------------------------------+--------------------------+
| tenant_id                        | id                                   | name | network_id                           | mac_address       | admin_state_up | status | device_id                                                                     | device_owner             |
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+-------------------------------------------------------------------------------+--------------------------+
| b7e3c98141c547c48d3e8fa8d5b354cf | 1bfd8c5d-2ce8-47fd-afdd-ab205e992d80 |      | f01ab808-75e0-4993-8950-befb6a505a07 | fa:16:3e:df:9a:74 |              1 | DOWN   | 77609028-c7fc-4de3-8714-cb4f50c73608                                          | network:router_interface |
| b7e3c98141c547c48d3e8fa8d5b354cf | 7f23187d-95c3-4d31-98cd-2997650ddcc0 |      | f01ab808-75e0-4993-8950-befb6a505a07 | fa:16:3e:da:cd:1a |              1 | DOWN   | dhcp05b39bfd-2caa-546e-865c-e53aafde44a4-f01ab808-75e0-4993-8950-befb6a505a07 | network:dhcp             |
| b7e3c98141c547c48d3e8fa8d5b354cf | d7caf61b-f946-430a-b367-274266bbee5d |      | b869ad30-fb88-4ecb-93a4-56092fe45fa9 | fa:16:3e:b7:74:4c |              1 | DOWN   | dhcp05b39bfd-2caa-546e-865c-e53aafde44a4-b869ad30-fb88-4ecb-93a4-56092fe45fa9 | network:dhcp             |
+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+-------------------------------------------------------------------------------+--------------------------+
3 rows in set (0.00 sec)
edit flag offensive delete link more

Comments

have you router_delete_namespaces = True and dhcp_delete_namespaces = True ?

darragh-oreilly gravatar imagedarragh-oreilly ( 2015-06-02 13:16:23 -0500 )edit

Where should I have those options?

jlausuch gravatar imagejlausuch ( 2016-07-13 06:41:11 -0500 )edit

maybe your version does not have them https://bugs.launchpad.net/neutron/+b...

darragh-oreilly gravatar imagedarragh-oreilly ( 2016-07-13 09:47:09 -0500 )edit

I am on Mitaka now and haven´t seen the issue so far... Maybe that´s the reason. Thanks!

jlausuch gravatar imagejlausuch ( 2016-07-13 16:31:23 -0500 )edit
-1

answered 2015-06-02 07:44:02 -0500

Vinoth gravatar image

List the namespace router using the command " ip netns "

If it list any router, then delete it.

This will delete the created router port.

edit flag offensive delete link more

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: 2015-05-31 06:11:30 -0500

Seen: 9,117 times

Last updated: Jul 12 '16