← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1828660] Re: The nova list --all-t command repeatedly queries database,which can seriously affect query performance

 

[Expired for OpenStack Compute (nova) because there has been no activity
for 60 days.]

** Changed in: nova
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1828660

Title:
  The nova list --all-t  command repeatedly queries database,which can
  seriously affect query performance

Status in OpenStack Compute (nova):
  Expired

Bug description:
  
  Description
  ===========
  In nova list command,we use expected_attrs to search for additional information. Some parameters are added to expected_attrs by default in our code flow, such as metadata or flavor. Unfortunately, metadata is added twice, which increase query time.

  We first add metadata in function:
       self._view_builder.get_show_expected_attrs(expected_attrs), 
  and the second is in fucntion:
       get_all():
           //other code
           fields = ['metadata', 'info_cache', 'security_groups']
           if expected_attrs:
              fields.extend(expected_attrs)
           //other code 

  Next, these attributes are divided into manual and automatic attributes in function
       def _manual_join_columns(columns_to_join):

  However, this function only remove metadata from columns_to_join_new for one time.So our code will search metadata for twice:
       query_prefix.all() 
  and 
       _instances_fill_metadata()


  Environment
  ===========
  [root@nail1 ~]# rpm -qa | grep nova
  openstack-nova-api-18.0.2-1.el7.noarch
  openstack-nova-common-18.0.2-1.el7.noarch
  python2-novaclient-11.0.0-1.el7.noarch
  openstack-nova-placement-api-18.0.2-1.el7.noarch
  openstack-nova-scheduler-18.0.2-1.el7.noarch
  openstack-nova-conductor-18.0.2-1.el7.noarch
  openstack-nova-novncproxy-18.0.2-1.el7.noarch
  python-nova-18.0.2-1.el7.noarch
  openstack-nova-compute-18.0.2-1.el7.noarch
  openstack-nova-console-18.0.2-1.el7.noarch

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1828660/+subscriptions


References