← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2036705] Re: A port that is disabled and bound is still ACTIVE with ML2/OVN

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/896939
Committed: https://opendev.org/openstack/neutron/commit/aead4aa99df4769462ec47045c8d973ae1b0a0a0
Submitter: "Zuul (22348)"
Branch:    master

commit aead4aa99df4769462ec47045c8d973ae1b0a0a0
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date:   Thu Sep 28 18:43:36 2023 +0000

    [OVN] Set the Neutron port status based on "lsp.up" and "lsp.enabled"
    
    The Neutron "port.status" field ("ACTIVE", "DOWN") is set depending on
    the Logical Switch Port "up" and "enabled" flags. Before this patch,
    the "port.status" depended only on the "up" flag. However, the user
    can set the "port.admin_state_up" field that will modify the
    "lsp.enabled" flag. If the "port.admin_state_up" is DOWN, the port
    does not transmit and the status should be "DOWN".
    
    The OVN backend is correctly disabling the port transmission; what
    was incorrect in the Neutron API is only the "port.status" field.
    
    This is currently working in other mechanism drivers like LB or OVS.
    
    Closes-Bug: #2036705
    Change-Id: I5b7b55b0b365df7246a571cea97a392cdf89bdb6


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

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

Title:
  A port that is disabled and bound is still ACTIVE with ML2/OVN

Status in neutron:
  Fix Released

Bug description:
  Issue originally reported to the Octavia project: https://bugs.launchpad.net/octavia/+bug/2033392
  During the failover of a loadbalancer, Octavia disables a port and waits for its status to be DOWN, but it never happens, the port is still ACTIVE (it impacts the duration of the failover in Octavia, but also the availability of the loadbalancer).

  
  When a bound port is disabled, its status is expected to be switched to DOWN.
  But with ML2/OVN, the port remains ACTIVE.

  
  $ openstack server create --image cirros-0.5.2-x86_64-disk --flavor m1.nano --network public server1
  [..]
  | id                                  | 7e392799-7a25-4ec6-a0ff-e479b3c37cc6                            |
  [..]

  
  $ openstack port list --device-id 7e392799-7a25-4ec6-a0ff-e479b3c37cc6
  +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
  | ID                                   | Name | MAC Address       | Fixed IP Addresses                                                           | Status |
  +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
  | 208c473c-4161-4c3a-ab9e-8444d7bc375f |      | fa:16:3e:85:bc:ac | ip_address='172.24.4.251', subnet_id='9441b590-d9d4-4f8f-b4aa-838736070222'  | ACTIVE |
  |                                      |      |                   | ip_address='2001:db8::322', subnet_id='813adce0-21de-44c9-958a-6967441b8623' |        |
  +--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+

  
  $ openstack port show -c admin_state_up -c status 208c473c-4161-4c3a-ab9e-8444d7bc375f 
  +----------------+--------+
  | Field          | Value  |
  +----------------+--------+
  | admin_state_up | UP     |
  | status         | ACTIVE |
  +----------------+--------+

  
  # Disabling the port
  $ openstack port set --disable 208c473c-4161-4c3a-ab9e-8444d7bc375f

  
  $ openstack port show -c admin_state_up -c status 208c473c-4161-4c3a-ab9e-8444d7bc375f
  +----------------+--------+
  | Field          | Value  |
  +----------------+--------+
  | admin_state_up | DOWN   |
  | status         | ACTIVE |
  +----------------+--------+

  Folks on #openstack-neutron confirmed that with ML2/OVS, the status is
  DOWN when the port is disabled.

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



References