API does two DB accesses when getting node, port

Bug #1547139 reported by Ruby Loo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Triaged
Medium
Unassigned

Bug Description

The API sometimes does two DB accesses when getting node and port (and portgroup) objects. This is a performance issue when getting thousands of nodes. (Noticed by Yahoo.)

The problem is that our nodes have a chassis ID. The API though, only exposes the chassis UUID so it will get the chassis object in order to get the UUID:

https://github.com/openstack/ironic/blob/edc37cbe1db539372a5e96296d7fbbebe9c50b2f/ironic/api/controllers/v1/node.py#L596

Jim Rollenhagen said that he has addressed this with his port changes:
https://review.openstack.org/#/q/status:open+project:openstack/ironic+branch:master+topic:refactor-object-registry

(I'm guessing https://review.openstack.org/#/c/262098/, but I haven't looked at them yet.)

Similarly, our ports and portgroups have node IDs.

Tags: db
Ruby Loo (rloo)
description: updated
Dmitry Tantsur (divius)
Changed in ironic:
status: New → Triaged
tags: added: db
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.