Doing unnecessary things when notifications are disabled

Bug #1660303 reported by Gorka Eguileor on 2017-01-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Gorka Eguileor

Bug Description

When running Cinder with notifications disabled we are still doing all the work and calls to Oslo message notifier and it's there, at the very last moment when it's going to send the message that it checks that there's no actual extension loaded in the driver manager and skips the actual send of the data.

This is considerably wasteful considering that for some of the notifications we are actually querying the DB to get data, for example volume attachments and glance metadata information when notifying about volume usage.

Gorka Eguileor (gorka) on 2017-01-30
Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
Changed in cinder:
status: New → In Progress
Gorka Eguileor (gorka) wrote :

Patch in progress is here: https://review.openstack.org/426547

Reviewed: https://review.openstack.org/426547
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a130387b4521a079e3408e8c8e3aa6c22caa8de2
Submitter: Jenkins
Branch: master

commit a130387b4521a079e3408e8c8e3aa6c22caa8de2
Author: Gorka Eguileor <email address hidden>
Date: Sat Jan 28 19:18:17 2017 +0100

    Short-circuit notifications when not enabled

    When running Cinder with notifications disabled we are still doing all
    the work and calls to Oslo message notifier and it's there, at the very
    last moment when it's going to send the message that it checks that
    there's no actual extension loaded in the driver manager and skips the
    actual send of the data.

    This is considerably wasteful considering that for some of the
    notifications we are actually querying the DB to get data, for example
    volume attachments and glance metadata information when notifying about
    volume usage.

    This patch proposes short-circuiting notification methods as much as
    possible to optimize code execution when Cinder has no notification
    transport mechanism configured, as is the case when deployed as a
    standalone SDS service.

    Closes-Bug: #1660303
    Change-Id: I77f655d3ef90088ce71304da5d4ea7b543991e90

Changed in cinder:
status: In Progress → Fix Released

This issue was fixed in the openstack/cinder 10.0.0.0rc1 release candidate.

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

Other bug subscribers