Horizon shows ports from all projects during launch instance if network is shared

Bug #1996108 reported by kiran pawar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
In Progress
Undecided
Unassigned

Bug Description

When a network is shared between multiple projects, horizon shows ports from all projects which have access to that network. This is a problem because each port actually has a “project_id“ property, and the port cannot be used for any instance outside of that project. When a user attempts to start an instance with a port from a different project, it fails like this: nova.exception.PortNotUsable

Steps to reproduce :-
==================

1. create network and share network between 2 projects
2. from Project A, manually create a port “Test Port“ on the network
    note that the port will have the project_id for Project A
3. from Project B, open the Launch Instance workflow
   navigate to “Network Ports”
4. At this point, you will see “Test Port” in the list. If you use it for the instance from Project B, the instance will fail

Solution :-
========

Patch horizon so that it only shows ports for the current project. The CLI does this already.
If I run openstack port list --network network_name --project project_name, it only shows the ports for the network which belong to the project

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/horizon/+/864205

Changed in horizon:
status: New → In Progress
Revision history for this message
Kiran Pawar (kpawar) wrote :

This should be default behavior of command "openstack port list". Getting the ports created in another project/tenant, will be of no use. Since if user tries to use those port to create instance, it fails. So port list should get ports belong to project even if parent network (under which ports created) is shared.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.