← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2086194] Re: [ovn-octavia-provider] Load balancer enable/disable has a reverse effect

 

Reviewed:  https://review.opendev.org/c/openstack/ovn-octavia-provider/+/933879
Committed: https://opendev.org/openstack/ovn-octavia-provider/commit/ced8c0d95ce5d96bc7d02a72a4ad6126f3f57a6c
Submitter: "Zuul (22348)"
Branch:    master

commit ced8c0d95ce5d96bc7d02a72a4ad6126f3f57a6c
Author: Dmitriy Rabotyagov <dmitriy.rabotyagov@xxxxxxxxxx>
Date:   Thu Oct 31 17:57:26 2024 +0100

    Fix LB disable/enable functionality
    
    At the moment disabling/enabling Load Balancer created with the OVN
    provider will act in reverse. This is due to reffering to actual state
    of the Load Balancer rather then intended state while fetching list of
    VIPs that should be defined in OVN.
    
    A mistake was made when ovn_lb.external_ids was attempted to be
    updated as object is protected and update simply do not pass.
    
    Thus, we create a copy of it and pass to the _refresh_lb_vips instead.
    
    Closes-Bug: #2086194
    Change-Id: I6271079879d6bb724092a4693c7663034f4e2b9d


** 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/2086194

Title:
  [ovn-octavia-provider] Load balancer enable/disable has a reverse
  effect

Status in neutron:
  Fix Released

Bug description:
  Description
  ===========

  At the moment, if you attempt to disable LoadBalancer - it won't
  actually be disabled. What is worth, though, if you enable it - it
  will get disabled instead.

  This happens due to the logic somewhere here:
  https://opendev.org/openstack/ovn-octavia-provider/blame/commit/0673f16fc68d80c364ed8907b26c061be9b8dec1/ovn_octavia_provider/helper.py#L1469-L1471

  
  How to reproduce
  ================

  I've added some logging after the mentioned lines

  1. # openstack loadbalancer set --disable a9af9b37-a174-4d0d-8675-171f36bda3ac
  ------------------------------------------------------------------------------
  2024-10-31 13:55:07.985 706169 WARNING ovn_octavia_provider.helper [-] [DbSetCommand(_result=None, table=Load_Balancer, record=a8926b9e-ee5f-4262-b28f-bdb9da32acfa, col_values=(('external_ids', {'enabled': 'False'}),), if_exists=True), DbClearCommand(_result=None, table=Load_Balancer, record=a8926b9e-ee5f-4262-b28f-bdb9da32acfa, column=vips), DbSetCommand(_result=None, table=Load_Balancer, record=a8926b9e-ee5f-4262-b28f-bdb9da32acfa, col_values=(('vips', {'10.120.1.196:22': '10.120.0.140:22', '185.16.84.156:22': '10.120.0.140:22'}),), if_exists=True)]
  ------------------------------------------------------------------------------
  # ovn-nbctl --no-leader-only list Load_Balancer a9af9b37-a174-4d0d-8675-171f36bda3ac
  _uuid               : a8926b9e-ee5f-4262-b28f-bdb9da32acfa
  external_ids        : {enabled=False, listener_4c9d4336-8c69-47dc-9ff2-512686f8d4d7="22:pool_54774a49-9e0e-403d-ae17-9f0c7cf6b662", lr_ref=neutron-5bccb1fa-692a-4499-87db-3c1b534ddb35, ls_refs="{\"neutron-49b232c3-85be-430c-bce3-fbee66aecec9\": 2}", "neutron:member_status"="{\"0c565ce8-a58d-493d-b0c0-4fd3311cd2bd\": \"NO_MONITOR\"}", "neutron:vip"="10.120.1.196", "neutron:vip_fip"="185.16.84.156", "neutron:vip_port_id"="ff2cff77-bda2-442b-9b62-5dde67776760", pool_54774a49-9e0e-403d-ae17-9f0c7cf6b662="member_0c565ce8-a58d-493d-b0c0-4fd3311cd2bd_10.120.0.140:22_bf2bc9e3-5321-4fe0-8c33-ee6094a08b28"}
  health_check        : []
  ip_port_mappings    : {}
  name                : "a9af9b37-a174-4d0d-8675-171f36bda3ac"
  options             : {}
  protocol            : tcp
  selection_fields    : [ip_dst, ip_src, tp_dst, tp_src]
  vips                : {"10.120.1.196:22"="10.120.0.140:22", "185.16.84.156:22"="10.120.0.140:22"}


  
  2. # openstack loadbalancer set --enable a9af9b37-a174-4d0d-8675-171f36bda3ac
  -----------------------------------------------------------------------------
  2024-10-31 13:55:02.812 706182 WARNING ovn_octavia_provider.helper [-] [DbSetCommand(_result=None, table=Load_Balancer, record=a8926b9e-ee5f-4262-b28f-bdb9da32acfa, col_values=(('external_ids', {'enabled': 'True'}),), if_exists=True), DbClearCommand(_result=None, table=Load_Balancer, record=a8926b9e-ee5f-4262-b28f-bdb9da32acfa, column=vips), DbSetCommand(_result=None, table=Load_Balancer, record=a8926b9e-ee5f-4262-b28f-bdb9da32acfa, col_values=(('vips', {}),), if_exists=True)]
  -----------------------------------------------------------------------------
  # ovn-nbctl --no-leader-only list Load_Balancer a9af9b37-a174-4d0d-8675-171f36bda3ac
  _uuid               : a8926b9e-ee5f-4262-b28f-bdb9da32acfa
  external_ids        : {enabled=True, listener_4c9d4336-8c69-47dc-9ff2-512686f8d4d7="22:pool_54774a49-9e0e-403d-ae17-9f0c7cf6b662", lr_ref=neutron-5bccb1fa-692a-4499-87db-3c1b534ddb35, ls_refs="{\"neutron-49b232c3-85be-430c-bce3-fbee66aecec9\": 2}", "neutron:member_status"="{\"0c565ce8-a58d-493d-b0c0-4fd3311cd2bd\": \"NO_MONITOR\"}", "neutron:vip"="10.120.1.196", "neutron:vip_fip"="185.16.84.156", "neutron:vip_port_id"="ff2cff77-bda2-442b-9b62-5dde67776760", pool_54774a49-9e0e-403d-ae17-9f0c7cf6b662="member_0c565ce8-a58d-493d-b0c0-4fd3311cd2bd_10.120.0.140:22_bf2bc9e3-5321-4fe0-8c33-ee6094a08b28"}
  health_check        : []
  ip_port_mappings    : {}
  name                : "a9af9b37-a174-4d0d-8675-171f36bda3ac"
  options             : {}
  protocol            : tcp
  selection_fields    : [ip_dst, ip_src, tp_dst, tp_src]
  vips                : {}

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



References