Cinder needs to be explicitly importing gettextutils _

Bug #1306275 reported by Jay Bryant
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Jay Bryant

Bug Description

Currently Cinder is using a combination of explicit imports of 'gettextutils _' and using the globally added _ that comes with the use of gettextutils.install()

The problem with just using gettextutils.install() is that it sets up _ for the whole Python VM to use the 'cinder' messaging catalog. This is problematic in the case that Cinder is also interacting with libraries from other projects. It will overload the _() function and cause logs that should go into other projects into the cinder log files.

Other projects (keystone and nova for sure) have made this change and Cinder should make the same change.

Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → High
assignee: nobody → Jay Bryant (jsbryant)
Jay Bryant (jsbryant)
Changed in cinder:
milestone: none → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/105315

Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit eafcc41e82ced6d72d1cfe0105e44c383f28a23a
Author: Jay S. Bryant <email address hidden>
Date: Thu Jun 26 16:22:17 2014 -0500

    Explicitly import _() in Cinder code

    To ensure that logs are properly translated and logged to
    the Cinder log files (using the Cinder message catalogs)
    we need to explicitly import _() in any python files that
    use the _() function.

    Closes-bug: 1306275
    Related-Blueprint: i18n-enablement
    Change-Id: I3cf1f1d63d5f8bd8ffd007104691f914e3fd8538

Changed in cinder:
status: In Progress → Fix Committed
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-2 → 2014.2
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.