Filter instances by IP when listing is not efficient enough

Bug #1711303 reported by Zhenyu Zheng
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Zhenyu Zheng

Bug Description

Filtering instance by IP when listing is done by:
http://git.openstack.org/cgit/openstack/nova/tree/nova/compute/api.py#n2457

this is due to that IP address is one part of the instance.network_info JSON,
we have to iterate one by one to find the instance that matches the request.

This is actually not efficient enough, on our public cloud deployment, one
Enterprise user could own over 1000 instances and when they filter by
IP, HTTP 500 timeout raised.

We might consider improve the implementation.

Revision history for this message
Zhenyu Zheng (zhengzhenyu) wrote :

Actually, our test is done using Horizon, and it has a limit added automatically
when listing instances. But for IP filters, the limit is removed first to get a
full instance list, then match the IP and then apply limit again.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Marking as confirmed since this is a long-standing known issue.

Changed in nova:
status: New → Confirmed
tags: added: api performance
Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
Revision history for this message
Matt Riedemann (mriedem) wrote :

Discussed this at the Queens PTG, notes are here:

https://etherpad.openstack.org/p/nova-ptg-queens

We have a few ideas, but need to start working on proof of concept solutions.

Revision history for this message
jichenjc (jichenjc) wrote :

I remember this bug was changed to a bp, should close it now?

Revision history for this message
Zhenyu Zheng (zhengzhenyu) wrote :

yeah, we should close this now, but how to do it? should we link the bp here?

Revision history for this message
jichenjc (jichenjc) wrote :

guess just add bp and patch link might be enough? anyway, let's close it :)

Revision history for this message
Zhenyu Zheng (zhengzhenyu) wrote :
Changed in nova:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers