[Performance] Speed-up endpoint notification

Bug #1890602 reported by Alex Kavanagh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Keystone Charm
Fix Released
Undecided
Alex Kavanagh

Bug Description

Keystone, in a large model, gets very slow in updating endpoint information. This is because it re-fetches the same information for every iteration through the loops it uses to resolve endpoints.

It starts in "add_service_to_keystone()" which then calls "add_endpoint()" for each endpoint. This then calls "create_service_entry" which calls "manager.list_services()" (so that's a list_services() for each endpoint).

Then create_endpoint_template_vx() function then call manager.list_endpoints(). So this is multiple calls between keystone charm <-> manager.py to keystone, which results in mysql lookups, etc.

It ought to be possible to do a single call to list_services, list_endpoint()s and then use that data to decide what to do next (which is probably, just make a single call to set up the single set of endpoints that are needed). This would radically improve the performance around endpoint addition.

Changed in charm-keystone:
assignee: nobody → Alex Kavanagh (ajkavanagh)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-keystone (master)

Fix proposed to branch: master
Review: https://review.opendev.org/750399

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-keystone (master)

Reviewed: https://review.opendev.org/750399
Committed: https://git.openstack.org/cgit/openstack/charm-keystone/commit/?id=13f5ce49fe438650322492ebee68223f73a2a207
Submitter: Zuul
Branch: master

commit 13f5ce49fe438650322492ebee68223f73a2a207
Author: Alex Kavanagh <email address hidden>
Date: Tue Sep 8 16:04:13 2020 +0100

    Fix performance issue when updating endpoints

    This patch eliminates almost all the manager.py calls when
    updating/checking the endpoints from the relation(s) with other charms.

    Change-Id: Ibb7999239ec9927e76052b7e45c4545127b5919a
    Closes-Bug: #1890602

Changed in charm-keystone:
status: In Progress → Fix Committed
Changed in charm-keystone:
milestone: none → 20.10
Changed in charm-keystone:
status: Fix Committed → Fix Released
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.