← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1996108] Re: Horizon shows ports from all projects during launch instance if network is shared

 

Reviewed:  https://review.opendev.org/c/openstack/horizon/+/864205
Committed: https://opendev.org/openstack/horizon/commit/d66f9d1c6728e41d882cadd09f5bb6646ce6e9d0
Submitter: "Zuul (22348)"
Branch:    master

commit d66f9d1c6728e41d882cadd09f5bb6646ce6e9d0
Author: Darrick Horton <darrick@xxxxxxxxxxx>
Date:   Thu Nov 10 14:53:16 2022 +0100

    List ports with project_id.
    
    During launch_instance, all ports belonging to network are shown if the
    network is shared. However 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
    
    Fix by filters port_list with project_id.
    
    Closes-bug: #1996108
    Change-Id: If94e91e5ae6568e06096380c2bf65d08d20a5958


** Changed in: horizon
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1996108

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

Status in OpenStack Dashboard (Horizon):
  Fix Released

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1996108/+subscriptions



References