Remove obsolete code that significantly slows down dcorch startup

Bug #1977994 reported by Kyle MacLeod
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Kyle MacLeod

Bug Description

Brief Description
The software version check in IdentitySyncThread is no longer relevant and needs to be removed. It slows down dcorch-engine startup significantly
https://opendev.org/starlingx/distcloud/src/commit/388b82609185479bc7aae8cda70c0784d5a465a7/distributedcloud/dcorch/engine/sync_services/identity.py#L69

Severity
Major

Steps to Reproduce
Profile dcorch-engine startup

Expected Behavior
Speedy startup

Actual Behavior
Identity sync thread initialization is slowed down considerably because of version check. This is more apparent in large lab.

Reproducibility
100% reproducible

System Configuration
Distributed Cloud

Load info (eg: 2022-03-10_20-00-07)
Starlingx master from 2022-06-05

Last Pass
N/A

Timestamp/Logs
2022-06-06 20:15:33.968 1221364 INFO dcorch.engine.generic_sync_manager [req-a03d705a-12eb-4260-b53f-0dec5f385627 - - - - -] Engine id:(936e0ff3-a9e7-484a-9ae6-230aead39b2d) init_from_db: 1108.756395 sec │2022-06-06 20:15:36.871 1221365 INFO dcorch.engine.generic_sync_manager [req-9644733a-5b16-4a08-bc68-d987b8910d95 - - - - -] Engine id:(b03319f8-3f91-420b-b207-39b86cbf94ef) init_from_db: 1111.564746 sec │2022-06-06 20:16:13.310 1221367 INFO dcorch.engine.generic_sync_manager [req-2bbda3b2-3d96-4372-9588-2f5c12ea3235 - - - - -] Engine id:(d75460c5-375c-4008-ade0-bf1e4b704162) init_from_db: 1148.009681 sec │2022-06-06 20:17:38.614 1221363 INFO dcorch.engine.generic_sync_manager [req-944f51e3-9f79-474d-b259-7cea0d3a1e6e - - - - -] Engine id:(35afc79e-a22c-48f4-ac61-6d948f7f2d0d) init_from_db: 1233.311176 sec │2022-06-06 20:17:38.746 1221366 INFO dcorch.engine.generic_sync_manager [req-2df03a7e-c1c2-441b-9861-8fe6e4b7bb1c - - - - -] Engine id:(29634af2-3a25-4e13-afbb-239ce6875090) init_from_db: 1233.43956 sec │

Alarms
N/A

Test Activity
Developer Testing

Workaround
N/A

Kyle MacLeod (kmacleod)
Changed in starlingx:
assignee: nobody → Kyle MacLeod (kmacleod)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to distcloud (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/distcloud/+/845165

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

Reviewed: https://review.opendev.org/c/starlingx/distcloud/+/845165
Committed: https://opendev.org/starlingx/distcloud/commit/c6be0604ed00ec47d7245fc9367e4f3e67f6447b
Submitter: "Zuul (22348)"
Branch: master

commit c6be0604ed00ec47d7245fc9367e4f3e67f6447b
Author: Kyle MacLeod <email address hidden>
Date: Wed Jun 8 13:53:49 2022 -0400

    Remove obsolete software_version check

    Remove the check for 21.05 software_version in __init__.
    This removes the need to obtain the as-yet uncached
    OpenStackDriver instance for every subcloud during startup.
    On a large system this significantly reduces the startup
    time spent in GenericSyncManager init_from_db()

    Test Plan:

    PASS:

    Verify normal startup and initialization via GenericSyncManager
    - Verified on StarlingX master load as well as on patched 21.12 load

    Verify startup on large system
    - Startup time is reduced from many minutes down to 2s

    Before/After on a large DC system from generic_sync_manager:

    Engine id:(c8816967-1c87-4e32-a1e2-8b900d97878e) init_from_db finished
    [1109.9s]

    Engine id:(58c49ff0-181b-435b-b0fc-bf20ecbf4498) init_from_db finished
    [2.7s]

    Closes-Bug: 1977994

    Signed-off-by: Kyle MacLeod <email address hidden>
    Change-Id: I2ba1fee039d7e9fa7ba6094a020c96932e013b30

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.7.0 stx.distcloud
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.