debug log messages need to be unicode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
High
|
Jay Bryant | ||
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
James Carey | ||
oslo-incubator |
Fix Released
|
Undecided
|
James Carey | ||
cinder (Ubuntu) |
Fix Released
|
Undecided
|
Liang Chen | ||
Trusty |
New
|
Undecided
|
Liang Chen | ||
nova (Ubuntu) |
Fix Released
|
Undecided
|
Liang Chen |
Bug Description
Nova SRU:
[Impact]
* Nova services fail to start because they cannot connect to rsyslog
[Test Case]
* Set user_syslog to True in nova.conf, stop rsyslog service and restart nova services.
[Regression Potential]
* The following patches from 1385295 and 1399088 that address the
regression introduced in this bug's fix are also included.
fix-
move-
When nova services log to syslog, they should wait for syslog to start prior to the nova-* services start.
Cinder SRU:
[Impact]
* Cinder services fail to start because they cannot connect to rsyslog
[Test Case]
* Set user_syslog to True in cinder.conf, stop rsyslog service and restart cinder services.
[Regression Potential]
* The following patches from 1385295 and 1399088 that address the
regression introduced in this bug's fix are also included.
fix-
move-
When cinder services log to syslog, they should wait for syslog to start prior to the cinder-* services start.
Debug logs should be:
LOG.
Before the translation of debug log messages was removed, the translation was returning unicode. Now that they are no longer translated they need to be explicitly marked as unicode.
This was confirmed by discussion with dhellman. See 2014-07-23T13:48:23 in this log http://
The problem was discovered when an exception was used as replacement text in a debug log message:
In particular it was discovered as part of enabling lazy translation, where the exception message is replaced with an object that does not support str(). Note that this would also fail without lazy enabled, if a translation for the exception message was provided that was unicode.
Example trace:
Traceback (most recent call last):
File "nova/tests/
self.
File "nova/virt/
fs.setup()
File "nova/virt/
LOG.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
hdlr.
File "nova/test.py", line 212, in handle
self.
File "/usr/lib/
return fmt.format(record)
File "/usr/lib/
record.message = record.getMessage()
File "/usr/lib/
msg = msg % self.args
File "/opt/stack/
raise UnicodeError(msg)
UnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.
=======
FAIL: nova.tests.
tags: worker-3
Changed in nova: | |
assignee: | nobody → James Carey (jecarey) |
Changed in oslo: | |
assignee: | nobody → James Carey (jecarey) |
Changed in cinder: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | none → juno-3 |
status: | Fix Committed → Fix Released |
Changed in oslo-incubator: | |
milestone: | none → juno-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-3 → 2014.2 |
Changed in cinder: | |
milestone: | juno-3 → 2014.2 |
description: | updated |
description: | updated |
Changed in nova (Ubuntu): | |
status: | New → In Progress |
assignee: | nobody → Liang Chen (cbjchen) |
Changed in cinder (Ubuntu): | |
assignee: | nobody → Liang Chen (cbjchen) |
status: | New → In Progress |
Changed in cinder (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in nova (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in cinder (Ubuntu Trusty): | |
assignee: | nobody → Liang Chen (cbjchen) |
Changed in nova (Ubuntu Trusty): | |
assignee: | nobody → Liang Chen (cbjchen) |
description: | updated |
A hacking check will also need to be created to go with this to make sure this issue doesn't creep in with future commits.