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

2017-08-17 Thread Xiong, Huan
> This may be a bug; I recall it was patched recently and perhaps the same logic
> needs to be applied to the Admin view. It sounds like an oversight.

Thanks, Rob. I filed 1711486. What you mentioned is probably df194c8b.
It added code in Admin dashboard instance index view class to retrieve
image objects, but didn't use them to set instances' image attribute.

Thanks,
Ray

>
> Rob
>
> > On 14 Aug 2017, at 03:46, Xiong, Huan 
> wrote:
> >
> > 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.
> >
> >
> >
> >
> __
> 
> >  OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> > openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> __
> 
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-
> requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



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.


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2017-08-17 Thread Rob Cresswell (rcresswe)
This may be a bug; I recall it was patched recently and perhaps the same logic 
needs to be applied to the Admin view. It sounds like an oversight.

Rob

> On 14 Aug 2017, at 03:46, Xiong, Huan  wrote:
> 
> 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.
> 
> 
> 
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


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

2017-08-13 Thread Xiong, Huan
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.



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev