bdm is wastefully loaded for versioned instance notifications

Bug #1718226 reported by Balazs Gibizer on 2017-09-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Balazs Gibizer

Bug Description

The block device mapping is included in the instance versioned notifications with I18e7483ec9a484a660e1d306fdc0986e1d5f952b. This means that if so configured nova will load the BDM from the DB for every instance notification. This is wasteful when the BDM is already loaded in the context of the call from where the notification is emitted. In this case that BDM should be reused to remove the unnecessary DB load.

Changed in nova:
assignee: nobody → Balazs Gibizer (balazs-gibizer)
tags: added: notifications
Changed in nova:
status: New → In Progress
Changed in nova:
assignee: Balazs Gibizer (balazs-gibizer) → Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Balazs Gibizer (balazs-gibizer)

Reviewed: https://review.openstack.org/483324
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c4fadfd4d290f1083ab520aed920eeff552e15c4
Submitter: Jenkins
Branch: master

commit c4fadfd4d290f1083ab520aed920eeff552e15c4
Author: Balazs Gibizer <email address hidden>
Date: Thu Jul 13 14:06:13 2017 +0200

    use already loaded BDM in instance.<action>

    In I18e7483ec9a484a660e1d306fdc0986e1d5f952b BDM was added to the instance
    notifications. In general to add BDM to the payload an exta DB query is
    needed. However in some places the BDM is already separately before the
    notify_about_instance_action is called to send the notification. In this cases
    loading the BDM again is unnecessary as the already loaded BDM can be reused.

    This patch makes sure that notify_about_instance_action is called with the
    already loaded BDM. There will be subsequent patches to do the same with
    other notify calls.

    Change-Id: I391554d3904a5a60b921ef4714a1cfd0a64a25c2
    Related-Bug: #1718226

Reviewed: https://review.openstack.org/483955
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=41a0f51341087e48eba16bbf6fd0bf779dd3b189
Submitter: Jenkins
Branch: master

commit 41a0f51341087e48eba16bbf6fd0bf779dd3b189
Author: Balazs Gibizer <email address hidden>
Date: Thu Jul 13 14:57:15 2017 +0200

    use already loaded BDM in instance.<action> (2)

    I8849ae0f54605e003d5b294ca3d66dcef89d7d27 made it possible for
    _get_instance_block_device_info to take a BDM parameter instead of
    loading the BDM from the db. This allow us to load the BDM a bit
    earlier in the call chain and pass that BDM to the notification calls
    too.

    The remaining calls of the notify_about_instance_action does not have
    the BDM loaded already.

    Change-Id: Icc3ffe4037a44f4f323bec2f80d99ca226742e22
    Related-Bug: #1718226

Reviewed: https://review.openstack.org/483969
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ad33ae5771de3a90472ca836a7b2292c6334fe9e
Submitter: Jenkins
Branch: master

commit ad33ae5771de3a90472ca836a7b2292c6334fe9e
Author: Balazs Gibizer <email address hidden>
Date: Fri Jul 14 17:19:03 2017 +0200

    use already loaded BDM in instance.create

    In I18e7483ec9a484a660e1d306fdc0986e1d5f952b BDM was added to the instance
    notifications. In general to add BDM to the payload an exta DB query is
    needed. However the BDM is already locaded before the
    notify_about_instance_create is called to send the notification. In this cases
    loading the BDM again is unnecessary as the already loaded BDM can be reused.

    This patch makes sure that notify_about_instance_create is called with the
    already loaded BDM.

    The remaining instance related versioned notification calls does not have
    BDM already loaded.

    Change-Id: Ic25de45c18348206f0309da6d4997f4bf336acb2
    Closes-Bug: #1718226

Changed in nova:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova 17.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers