non-unicode error message -> glance-reg dies without saying why

Bug #1383255 reported by James Polley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Unassigned

Bug Description

My logs were full of:

Oct 20 11:21:35 undercloud-undercloud-uxtyfj4ag5qy glance-reg: 2014-10-20 11:21:35.199 34161 TRACE glance Traceback (most recent call last):
Oct 20 11:21:35 undercloud-undercloud-uxtyfj4ag5qy glance-reg: 2014-10-20 11:21:35.199 34161 TRACE glance File "/opt/stack/venvs/glance/bin/glance-registry", line 10, in <module>
Oct 20 11:21:35 undercloud-undercloud-uxtyfj4ag5qy glance-reg: 2014-10-20 11:21:35.199 34161 TRACE glance sys.exit(main())
Oct 20 11:21:35 undercloud-undercloud-uxtyfj4ag5qy glance-reg: 2014-10-20 11:21:35.199 34161 TRACE glance File "/opt/stack/venvs/glance/local/lib/python2.7/site-packages/glance/cmd/registry.py", line 74, in main
Oct 20 11:21:35 undercloud-undercloud-uxtyfj4ag5qy glance-reg: 2014-10-20 11:21:35.199 34161 TRACE glance sys.exit("ERROR: %s" % e)
Oct 20 11:21:35 undercloud-undercloud-uxtyfj4ag5qy glance-reg: 2014-10-20 11:21:35.199 34161 TRACE glance File "/opt/stack/venvs/glance/local/lib/python2.7/site-packages/oslo/i18n/_message.py", line 167, in __str__
Oct 20 11:21:35 undercloud-undercloud-uxtyfj4ag5qy glance-reg: 2014-10-20 11:21:35.199 34161 TRACE glance raise UnicodeError(msg)
Oct 20 11:21:35 undercloud-undercloud-uxtyfj4ag5qy glance-reg: 2014-10-20 11:21:35.199 34161 TRACE glance UnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.
Oct 20 11:21:35 undercloud-undercloud-uxtyfj4ag5qy glance-reg: 2014-10-20 11:21:35.199 34161 TRACE glance

After this, init would restart glance-reg, ready for it to die again shortly afterwards.

The original error is swallowed by the error processing the first error message, and I can't tell what the original error was.

Revision history for this message
James Polley (tchaypo) wrote :

http://lists.openstack.org/pipermail/openstack-dev/2014-June/038857.html gave me a big hint about what was happening here.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/129579
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=b52c7970a0e14a2be1526c2d6312e023272b3912
Submitter: Jenkins
Branch: master

commit b52c7970a0e14a2be1526c2d6312e023272b3912
Author: James Polley <email address hidden>
Date: Mon Oct 20 22:26:18 2014 +1100

    Use unicode for error message

    Prior to this change, glance-reg would encounter an error, then
    encounter an error reporting the first error. Glance-reg would end up
    dead with the only error message printed being about the fact that the
    first error message wasn't unicode.

    After this change, glance-reg still dies just as readily - but on the
    way down, it manages to emit the original error message. In my case,
    this means that I now know that the original fault is that it can't bind
    to 0.0.0.0:9191

    Change-Id: I0e90b538996f87fe100c973fdf1fb61791e4e660
    closes-bug: 1383255

Changed in glance:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Changed in glance:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in glance:
milestone: kilo-1 → 2015.1.0
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.