Public bug reported: 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 : {} ** Affects: neutron Importance: Undecided Status: New -- 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: New 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 -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp