← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2016197] Re: [Open Discussion] neutron can create port from network which has no subnet

 

This proposal has been declined in the Neutron drivers meeting (see
meeting logs). The change of the current behaviour of the API is not
needed to fix LP#2016198 and could be in use now.

The proposal to fix LP#2016198 is to limit the creation of the
"L3HARouterNetwork" DB resource [1][2]. The HA network is created per
project. Only one network should be created at once. If we limit in the
DB engine the number of "L3HARouterNetwork" per project, by making the
"project_id" unique, we'll prevent the race condition.

[1]https://github.com/openstack/neutron/blob/47d070c71e795e41e698cdb278d99dcfb3448bde/neutron/objects/l3_hamode.py#L58
[2]https://github.com/openstack/neutron/blob/master/neutron/db/models/l3ha.py#L62

** Changed in: neutron
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2016197

Title:
  [Open Discussion] neutron can create port from network which has no
  subnet

Status in neutron:
  Won't Fix

Bug description:
  # openstack network create test-network
  +---------------------------+--------------------------------------+
  | Field                     | Value                                |
  +---------------------------+--------------------------------------+
  | admin_state_up            | UP                                   |
  | availability_zone_hints   |                                      |
  | availability_zones        |                                      |
  | created_at                | 2023-04-13T07:31:16Z                 |
  | description               |                                      |
  | dns_domain                | None                                 |
  | id                        | d595860d-e576-4899-882a-8428cfe601f2 |
  | ipv4_address_scope        | None                                 |
  | ipv6_address_scope        | None                                 |
  | is_default                | False                                |
  | is_vlan_transparent       | None                                 |
  | mtu                       | 1450                                 |
  | name                      | test-network                         |
  | port_security_enabled     | True                                 |
  | project_id                | c675870e8b8e48e7a339907b5bcf7c8c     |
  | provider:network_type     | vxlan                                |
  | provider:physical_network | None                                 |
  | provider:segmentation_id  | 99941                                |
  | qos_policy_id             | None                                 |
  | revision_number           | 1                                    |
  | router:external           | Internal                             |
  | segments                  | None                                 |
  | shared                    | False                                |
  | status                    | ACTIVE                               |
  | subnets                   |                                      |
  | tags                      |                                      |
  | updated_at                | 2023-04-13T07:31:16Z                 |
  +---------------------------+--------------------------------------+

  
  # openstack port create --network d595860d-e576-4899-882a-8428cfe601f2 test-create-port-net-has-no-subnet
  +-----------------------+--------------------------------------+
  | Field                 | Value                                |
  +-----------------------+--------------------------------------+
  | admin_state_up        | UP                                   |
  | allowed_address_pairs |                                      |
  | binding_host_id       |                                      |
  | binding_profile       |                                      |
  | binding_vif_details   |                                      |
  | binding_vif_type      | unbound                              |
  | binding_vnic_type     | normal                               |
  | created_at            | 2023-04-13T07:35:46Z                 |
  | data_plane_status     | None                                 |
  | description           |                                      |
  | device_id             |                                      |
  | device_owner          |                                      |
  | dns_assignment        | None                                 |
  | dns_domain            | None                                 |
  | dns_name              | None                                 |
  | extra_dhcp_opts       |                                      |
  | fixed_ips             |                                      |
  | id                    | 1f2e55bc-9e8f-45ca-b16d-d8e32c1c4bb5 |
  | mac_address           | fa:16:3e:04:18:10                    |
  | name                  | test-create-port-net-has-no-subnet   |
  | network_id            | d595860d-e576-4899-882a-8428cfe601f2 |
  | port_security_enabled | True                                 |
  | project_id            | c675870e8b8e48e7a339907b5bcf7c8c     |
  | qos_policy_id         | None                                 |
  | revision_number       | 2                                    |
  | security_group_ids    | a3d879a7-2e72-4b68-960e-cfa20569c2b0 |
  | status                | DOWN                                 |
  | tags                  |                                      |
  | trunk_details         | None                                 |
  | updated_at            | 2023-04-13T07:35:46Z                 |
  +-----------------------+--------------------------------------+

  Port has no fixed ips.

  Is such behavior is useful? or neutron should disable such creation?

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



References