How to Delete Orphaned Neutron Port
Hello,
We running Rocky version and seems like have a big problem. We have a lot orphaned ports. We trying remove old unused network and we cannot do it because exists a lot orphaned ports.
Error output when trying remove one of the orphaned port:
DEBUG: neutronclient.v2_0.client Error message: {"NeutronError": {"message": "Binding for port 044f0c61-caf3-4144-b5bb-b2fdbfaa4f19 for host could not be found.", "type": "PortBindingNotFound", "detail": ""}}
ERROR: neutronclient.shell Unable to find port(s) with id(s) '044f0c61-caf3-4144-b5bb-b2fdbfaa4f19'.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/neutronclient/shell.py", line 531, in run_subcommand
return run_command(cmd, cmd_parser, sub_argv)
File "/usr/lib/python2.7/site-packages/neutronclient/shell.py", line 68, in run_command
return cmd.run(known_args)
File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 335, in run
return super(NeutronCommand, self).run(parsed_args)
File "/usr/lib/python2.7/site-packages/cliff/command.py", line 184, in run
return_code = self.take_action(parsed_args) or 0
File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 517, in take_action
self._bulk_delete(obj_deleter, neutron_client, parsed_args.id)
File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 556, in _bulk_delete
raise exceptions.NeutronCLIError(message='\n'.join(err_msgs))
NeutronCLIError: Unable to find port(s) with id(s) '044f0c61-caf3-4144-b5bb-b2fdbfaa4f19'.
Unable to find port(s) with id(s) '044f0c61-caf3-4144-b5bb-b2fdbfaa4f19'.
Which command generates this message?
Does port 044f0c61-caf3-4144-b5bb-b2fdbfaa4f19 exist at all?
What do the Neutron logs say?
This output generate neutron client command:
neutron port-delete 044f0c61-caf3-4144-b5bb-b2fdbfaa4f19 -v
I tried openstack cli, but the same situation. Neutron sever output:DELETE failed (client error): The resource could not be found.
I think delete problem related with port binding. This port is without binding information. I not found any information about this port in neutron DB(Table: portbindingports)
The error message indicates that the port simply doesn't exist. As a consequence, it has no port binding information. Therefore my question if this port exists at all.
Yes, this port and all same ports exists at all. If I list or try show ports exists.