Bug 1959694 - fails to delete loadbalancer with osc_lib.exceptions.CommandError: Unable to locate loadbalancers
Summary: fails to delete loadbalancer with osc_lib.exceptions.CommandError: Unable to ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-octaviaclient
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z3
: 16.2 (Train on RHEL 8.4)
Assignee: Gregory Thiemonge
QA Contact: Bruna Bonguardo
URL:
Whiteboard:
Depends On:
Blocks: 1996088
TreeView+ depends on / blocked
 
Reported: 2021-05-12 06:37 UTC by Asma Syed Hameed
Modified: 2022-03-23 22:10 UTC (History)
7 users (show)

Fixed In Version: python-octaviaclient-1.10.1-2.20220215145235.b5397ea.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1996088 (view as bug list)
Environment:
Last Closed: 2022-03-23 22:10:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack Storyboard 2008892 0 None None None 2021-05-18 14:10:27 UTC
OpenStack gerrit 792122 0 None MERGED Support pagination for 'list' API calls 2021-06-25 07:16:32 UTC
OpenStack gerrit 796161 0 None MERGED Support pagination for 'list' API calls 2021-07-08 12:08:36 UTC
OpenStack gerrit 827817 0 None MERGED Fix "Support pagination for 'list' API calls" backport 2022-02-14 13:47:37 UTC
Red Hat Issue Tracker OSP-3834 0 None None None 2021-12-13 13:11:52 UTC
Red Hat Product Errata RHBA-2022:1001 0 None None None 2022-03-23 22:10:32 UTC

Description Asma Syed Hameed 2021-05-12 06:37:34 UTC
Description of problem:
Currently, we the Performance and Scale team are performing Octavia scale testing and we have scaled up to 2600 loadbalancers in our env using browbeat.

Scenario used: https://github.com/cloud-bulldozer/browbeat/blob/master/rally/octavia/octavia-create-show-loadbalancers.yml

MariaDB [octavia]>  select COUNT(*) from load_balancer;
+----------+
| COUNT(*) |
+----------+
|  2600    |
+----------+
1 row in set (0.002 sec)

MariaDB [octavia]>  select COUNT(provisioning_status) from load_balancer where provisioning_status = "ACTIVE";
+----------------------------+
| COUNT(provisioning_status) |
+----------------------------+
|                       2599 |
+----------------------------+
1 row in set (0.002 sec)

MariaDB [octavia]>  select COUNT(provisioning_status) from load_balancer where provisioning_status = "ERROR";
+----------------------------+
| COUNT(provisioning_status) |
+----------------------------+
|                          1 |
+----------------------------+
1 row in set (0.000 sec)

we are unable to delete the loadbalancer which was moved to the error state

(overcloud) [stack@undercloud ~]$ openstack loadbalancer list --provisioning-status ERROR
+--------------------------------------+---------------------------+----------------------------------+-------------+---------------------+----------+
| id                                   | name                      | project_id                       | vip_address | provisioning_status | provider |
+--------------------------------------+---------------------------+----------------------------------+-------------+---------------------+----------+
| c6f3cfd6-3a92-4b86-af06-5b8afcb2a569 | s_rally_d694abc8_5UrnaqBm | 05f291f113624aefbf170f23a14f8604 | 10.2.3.184  | ERROR               | amphora  |
+--------------------------------------+---------------------------+----------------------------------+-------------+---------------------+----------+

(overcloud) [stack@undercloud ~]$ openstack loadbalancer delete c6f3cfd6-3a92-4b86-af06-5b8afcb2a569 --debug
During handling of the above exception, another exception occurred:                                                                                                                                                
                                                                                                                                                                                                                   
Traceback (most recent call last):                                                                                                                                                                                 
  File "/usr/lib/python3.6/site-packages/cliff/app.py", line 401, in run_subcommand                                                                                                                                
    result = cmd.run(parsed_args)                                                                                                                                                                                  
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 185, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/octaviaclient/osc/v2/load_balancer.py", line 168, in take_action
    parsed_args)
  File "/usr/lib/python3.6/site-packages/octaviaclient/osc/v2/utils.py", line 173, in get_loadbalancer_attrs                                                                                                      
    attrs = _map_attrs(_attrs, attr_map)
  File "/usr/lib/python3.6/site-packages/octaviaclient/osc/v2/utils.py", line 35, in _map_attrs
    v,
  File "/usr/lib/python3.6/site-packages/octaviaclient/osc/v2/utils.py", line 118, in get_resource_id
    raise exceptions.CommandError(msg)
osc_lib.exceptions.CommandError: Unable to locate c6f3cfd6-3a92-4b86-af06-5b8afcb2a569 in loadbalancers
clean_up DeleteLoadBalancer: Unable to locate c6f3cfd6-3a92-4b86-af06-5b8afcb2a569 in loadbalancers
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/octaviaclient/osc/v2/utils.py", line 115, in get_resource_id
    return names[0].get('id')
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/osc_lib/shell.py", line 136, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python3.6/site-packages/cliff/app.py", line 281, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python3.6/site-packages/osc_lib/shell.py", line 176, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python3.6/site-packages/cliff/app.py", line 401, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 185, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/octaviaclient/osc/v2/load_balancer.py", line 168, in take_action                                                                                                         
    parsed_args)
  File "/usr/lib/python3.6/site-packages/octaviaclient/osc/v2/utils.py", line 173, in get_loadbalancer_attrs                                                                                                      
    attrs = _map_attrs(_attrs, attr_map)
  File "/usr/lib/python3.6/site-packages/octaviaclient/osc/v2/utils.py", line 35, in _map_attrs
    v,
  File "/usr/lib/python3.6/site-packages/octaviaclient/osc/v2/utils.py", line 118, in get_resource_id
    raise exceptions.CommandError(msg)
osc_lib.exceptions.CommandError: Unable to locate c6f3cfd6-3a92-4b86-af06-5b8afcb2a569 in loadbalancers

END return value: 1

 

Version-Release number of selected component (if applicable):
RHOS-16.1-RHEL-8-20210205.n.0

How reproducible:
100%

Steps to Reproduce:
1.Deploy OSP with Octavia
2.Scale up to 2k+ LB's


Actual results:
Unable to locate c6f3cfd6-3a92-4b86-af06-5b8afcb2a569 in loadbalancers


Expected results:
Loadbalancer should be deleted successfully

Additional info:

The ``openStack loadbalancer list`` command only fetches 1k LB's as the pagination_max_limit = 1000 is set by default, so it's not able to delete LB's whose ID is not reported by ``openstack loadbalancer list`` even though we fetched the id of the LB that was moved to error appending ``--provisioning-status ERROR`` option

Comment 3 Korry Nguyen 2021-06-01 21:48:13 UTC
elevate to high pri/sev since it's listed as important by perf and scale team.

Comment 13 Asma Syed Hameed 2022-02-09 04:43:04 UTC
Bruna,
We are currently occupied with other Perf Scale activities. As it can be tested without Scale lab please use the procedure mentioned above.

Comment 22 errata-xmlrpc 2022-03-23 22:10:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 16.2.2), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1001


Note You need to log in before you can comment on or make changes to this bug.