← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1687012] [NEW] flavor-delete notification should not try to lazy-load projects

 

Public bug reported:

When we destroy a flavor from the api database we send a notification:

https://github.com/openstack/nova/blob/5a363a0d72e7dd8d79d7e950effc1d8a5fdc801b/nova/objects/flavor.py#L608

However if flavor.projects isn't loaded we try to lazy-load it:

https://github.com/openstack/nova/blob/5a363a0d72e7dd8d79d7e950effc1d8a5fdc801b/nova/objects/flavor.py#L617

Which is going to result in a FlavorNotFound error because we just
deleted the flavor from the API database:

https://github.com/openstack/nova/blob/5a363a0d72e7dd8d79d7e950effc1d8a5fdc801b/nova/objects/flavor.py#L65

This doesn't blow everything up because we fallback to the main cell
database to get the flavor projects:

https://github.com/openstack/nova/blob/5a363a0d72e7dd8d79d7e950effc1d8a5fdc801b/nova/db/sqlalchemy/api.py#L5194

Which just returns an empty list.

I noticed this when removing the main db fallback paths in this change
and had to workaround it:

https://review.openstack.org/#/c/460377/

But it's really a separate bug fix.

** Affects: nova
     Importance: Medium
     Assignee: Matt Riedemann (mriedem)
         Status: Triaged


** Tags: notifications

** Changed in: nova
       Status: New => Triaged

** Changed in: nova
   Importance: Undecided => Medium

** Changed in: nova
     Assignee: (unassigned) => Matt Riedemann (mriedem)

** Tags added: notifications

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

Title:
  flavor-delete notification should not try to lazy-load projects

Status in OpenStack Compute (nova):
  Triaged

Bug description:
  When we destroy a flavor from the api database we send a notification:

  https://github.com/openstack/nova/blob/5a363a0d72e7dd8d79d7e950effc1d8a5fdc801b/nova/objects/flavor.py#L608

  However if flavor.projects isn't loaded we try to lazy-load it:

  https://github.com/openstack/nova/blob/5a363a0d72e7dd8d79d7e950effc1d8a5fdc801b/nova/objects/flavor.py#L617

  Which is going to result in a FlavorNotFound error because we just
  deleted the flavor from the API database:

  https://github.com/openstack/nova/blob/5a363a0d72e7dd8d79d7e950effc1d8a5fdc801b/nova/objects/flavor.py#L65

  This doesn't blow everything up because we fallback to the main cell
  database to get the flavor projects:

  https://github.com/openstack/nova/blob/5a363a0d72e7dd8d79d7e950effc1d8a5fdc801b/nova/db/sqlalchemy/api.py#L5194

  Which just returns an empty list.

  I noticed this when removing the main db fallback paths in this change
  and had to workaround it:

  https://review.openstack.org/#/c/460377/

  But it's really a separate bug fix.

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


Follow ups