Profiler raises an error when it is enabled

Bug #1467982 reported by Obed N Munoz
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Obed N Munoz
Kilo
Fix Released
Low
Ian Cordasco

Bug Description

Description:

When OSProfiler is enabled in Glance API and Registry, they raise the following exception:

CRITICAL glance [-] AttributeError: 'module' object has no attribute 'messaging'
TRACE glance Traceback (most recent call last):
TRACE glance File "/usr/bin/glance-api", line 10, in <module>
TRACE glance sys.exit(main())
TRACE glance File "/usr/lib/python2.7/site-packages/glance/cmd/api.py", line 80, in main
TRACE glance notifier.messaging, {},
TRACE glance AttributeError: 'module' object has no attribute 'messaging'
TRACE glance

Steps to reproduce:
1. Enable profiler in glance-api.conf and glance-registry.conf

[profiler]
enabled = True

2. Restart API and Registry Services

Expected Behavior:
Start services with profiler enabled

Obed N Munoz (obedmr)
Changed in glance:
assignee: nobody → Obed N Munoz (obed-n-munoz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by Ian Cordasco (<email address hidden>) on branch: master
Review: https://review.openstack.org/194725
Reason: Incomplete duplicate. Abandoning in favor of a newer version by the original bug reporter

Changed in glance:
status: New → In Progress
Ian Cordasco (icordasc)
Changed in glance:
importance: Undecided → Low
tags: added: kilo-backport-potential
Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
Flavio Percoco (flaper87) wrote :

mind putting the link to gerrit here?

Revision history for this message
Obed N Munoz (obedmr) wrote :
Revision history for this message
Ian Cordasco (icordasc) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/kilo)

Reviewed: https://review.openstack.org/194824
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=d1f54b71b863c2505ce31898f769a71624016e67
Submitter: Jenkins
Branch: stable/kilo

commit d1f54b71b863c2505ce31898f769a71624016e67
Author: Munoz, Obed N <email address hidden>
Date: Tue Jun 23 10:54:15 2015 -0500

    Fix OSProfiler exception when is enabled

    When OSProfiler is enabled in glance-api.conf or glance-registry.conf,
    the services are failing to start. They raise an AtttributeError
    exception when not finding messaging module from notifier

    When oslo removed namespaced packages in kilo, the code was changed
    in glance.notifier from doing

     from oslo import messaging

    To doing

            import oslo_messaging

    And all references were changed from messaging to oslo_messaging. When
    osprofiler integration was added, the author choose to use the notifier
    module's reference to oslo.messaging instead of importing it directly.
    When the rename occurred, this was not caught. So, oslo_messaging is
    directly imported in glance.cmd.{api,registry,search} and use it as
    it was intended

    Closes-Bug: #1467982

    Change-Id: I87c0d4f0885f5714e966218eabf06134772babfa
    Signed-off-by: Munoz, Obed N <email address hidden>
    (cherry picked from commit 37ad9fe7f292a7bbe969be78b1db2fec1c4c4813)

Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-2 → 11.0.0
no longer affects: glance/liberty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.