where do unused network ports come from

asked 2018-07-19 12:44:33 -0500

jamesopst gravatar image

hi all,

we are using Newton. when we "Launch Instance in Horizon we usually use the Networks tab to select the network we want for the instance. But we know the the Network Ports tab could also be used instead. We have a few precreated and prenamed ports in there which we use for specific instance that are created and deleted periodically.

But there are a whole long list of other ports in there too, from all the different networks we use. These are not pre-created. Where do they come from? They are all admin state up but status down. Are they needed for something, or should I be doing some cleaned up of these?


edit retag flag offensive close merge delete


To confirm that they are unused, check the device_owner field, which describes the type of object connected to the port. Also device_id, which identifies the object. The latter is the object’s UUID most of the time.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-19 17:20:21 -0500 )edit

thanks Bernd for the reply. I see device_owner is compute:nova for all of them. and as you say the device_id is the UUID. but where do these ports come from, they are not created manually by any users. are they left over when an instance is deleted? and if so does openstack delete them in time too?

jamesopst gravatar imagejamesopst ( 2018-07-24 10:15:21 -0500 )edit

When an instance goes away, all its ports should be removed as well. I don’t know if there is any reason other than a bug for them to stay around. If the device_id’s don’t correspond to existing instances, you should be able to delete them. If they are required for something, deletion will fail.

Bernd Bausch gravatar imageBernd Bausch ( 2018-07-24 16:47:41 -0500 )edit

The Neutron ports that were created automatically will be deleted once once corresponding VM is . What is the evidence that these ports simply do not belong to currently running VMs? You can analyze/paste (possibly sanized) openstack networking port show <...> / openstack server list --all-projects

volenbovsky gravatar imagevolenbovsky ( 2018-08-13 13:02:38 -0500 )edit