Cinder needs to be explicitly importing gettextutils _

Bug #1306275 reported by Jay Bryant on 2014-04-10
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
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) on 2014-04-10
Changed in cinder:
importance: Undecided → High
assignee: nobody → Jay Bryant (jsbryant)
Jay Bryant (jsbryant) on 2014-06-26
Changed in cinder:
milestone: none → juno-2

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

Changed in cinder:
status: New → In Progress

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) on 2014-10-16
Changed in cinder:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers