[openstack-dev] [horizon] Admin dashboard instances index page generated duplicate Glance requests

Xiong, Huan huan.xiong at hxt-semitech.com
Mon Aug 14 02:46:31 UTC 2017


Hi,

I observed accessing Admin dashboard's instance index page generated lots of duplicate requests to Glance for converting instance image id to name, but accessing Project dashboard's instance index page didn't (my system runs Newton, but from what I can tell, Ocata and Pike code seem to have same issue).

I looked at the code and found the reason. In Project dashboard's instance index view class, it first calls Glance's API to get a list of image objects, then iterates through instance objects and sets each instance's image attribute to corresponding image object. As a result, when instance object's image_name() is called later, it gets name from image object. In Admin dashboard's instance index view class, however, it doesn't do this and hence needs to send request to Glance everytime image_name() is called.

I wonder why Admin dashboard's instance index view class doesn't use the same approach as Project dashboard? Is it intended?

Thanks,
Ray



This email is intended only for the named addressee. It may contain information that is confidential/private, legally privileged, or copyright-protected, and you should handle it accordingly. If you are not the intended recipient, you do not have legal rights to retain, copy, or distribute this email or its contents, and should promptly delete the email and all electronic copies in your system; do not retain copies in any media. If you have received this email in error, please notify the sender promptly. Thank you.





More information about the OpenStack-dev mailing list