KeyError: u'memory_mb_limit' in nova.po

Bug #1101587 reported by Lance Bragstad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Jeremy Stanley

Bug Description

Discovered Key Error while trying to boot instances. The following code in nova.po at line 3743:

#: nova/compute/resource_tracker.py:168
#, fuzzy, python-format
msgid ""
"Attempting claim: memory %(memory_mb)d MB, disk %(disk_gb)d GB, VCPUs "
"%(vcpus)d"
msgstr ""
"Attempting claim: memory %(memory_mb)d MB, disk %(disk_gb)d GB, mem limit"
" %(memory_mb_limit)s"

https://github.com/openstack/nova/blob/master/nova/locale/en_US/LC_MESSAGES/nova.po#L3740

Produces the following error:

2013-01-18 15:56:22.796 ERROR nova.compute.manager [req-d7b141a1-f91b-4615-b344-518092b618dd 65836e9a4c594e7a929bad924d411b51 8712bc7ce33d452aba3c810e3825b63f] [instance: efa7e6ca-a66e-4b42-b76e-971d1868c8d2] Error: ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 680, in _run_instance\n with rt.instance_claim(context, instance, limits):\n', ' File "/usr/lib/python2.6/site-packages/nova/openstack/common/lockutils.py", line 234, in inner\n retval = f(*args, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/resource_tracker.py", line 102, in instance_claim\n if claim.test(self.compute_node, limits):\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/claims.py", line 120, in test\n LOG.audit(msg % params, instance=self.instance)\n', "KeyError: u'memory_mb_limit'\n"]

The string message can't be translated because it is trying to reference 'memory_mb_limit' as the key, which is not found.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

 the ./nova/locale/en_US/LC_MESSAGES/nova.po has a bad msgstr for at least one msgid - what's the process for updating the .po files? do we start by running extract_messages again?

Changed in nova:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Jeremy Stanley (fungi)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/20162
Committed: http://github.com/openstack/nova/commit/93af1058054c06b5420e01ff72091e3c1820ef2d
Submitter: Jenkins
Branch: master

commit 93af1058054c06b5420e01ff72091e3c1820ef2d
Author: Jeremy Stanley <email address hidden>
Date: Mon Jan 21 18:19:48 2013 +0000

    Update en_US message translations.

    Fixes bug 1101587.

    * nova/locale/en_US/LC_MESSAGES/nova.po: This "translation" was
    woefully outdated, causing KeyError exceptions under a number of
    circumstances for users of this particular locale when format
    strings wound up containing incorrect substitution variables. This
    change attempts to sync up the msgstr entries to match msgid given
    this is the source language for the pot file. I did not see any
    obvious instances where en_US should differ from C locale for these.

    Change-Id: I81d1729fee17653b089f3c47db20f3fc073ab363

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
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.