← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1393491] [NEW] _manual_join_columns should copy columns_to_join rather than mutate it

 

Public bug reported:

I noticed this while working on this change:

https://review.openstack.org/#/c/131490/3/

Tempest was failing on the simple tenant usage test because it couldn't
lazy-load system_metadata from the instance object to get the flavor in
the API.

This was because the DB API call was hitting this method:

http://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/api.py?id=2014.2#n1808

That modifies the columns_to_join list passed in and removes the
system_metadata entry, so later when we construct the instance object
from the DB record we didn't have 'system_metadata' in expected_attrs,
so we couldn't lazy-load the system_metadata from the instance object
and hit an error.

The _manual_join_columns method should be making a copy of
columns_to_join and modifying that before returning it, it shouldn't
actually modify the columns_to_join list passed in.

** Affects: nova
     Importance: Undecided
     Assignee: Matt Riedemann (mriedem)
         Status: New


** Tags: db

-- 
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/1393491

Title:
  _manual_join_columns should copy columns_to_join rather than mutate it

Status in OpenStack Compute (Nova):
  New

Bug description:
  I noticed this while working on this change:

  https://review.openstack.org/#/c/131490/3/

  Tempest was failing on the simple tenant usage test because it
  couldn't lazy-load system_metadata from the instance object to get the
  flavor in the API.

  This was because the DB API call was hitting this method:

  http://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/api.py?id=2014.2#n1808

  That modifies the columns_to_join list passed in and removes the
  system_metadata entry, so later when we construct the instance object
  from the DB record we didn't have 'system_metadata' in expected_attrs,
  so we couldn't lazy-load the system_metadata from the instance object
  and hit an error.

  The _manual_join_columns method should be making a copy of
  columns_to_join and modifying that before returning it, it shouldn't
  actually modify the columns_to_join list passed in.

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


Follow ups

References