cinder-volume capacity data parsing fails with non english locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Christoph Kassen |
Bug Description
In the LVM driver the capacity is calculated from the output of the vgs command. On systems with non english locale, where the decimal seperator is not a dot cinder-volume is unable to parse that data, which results in an exception.
The exception message is:
INFO cinder.
ERROR cinder.service [req-5b10cf00-
TRACE cinder.service Traceback (most recent call last):
TRACE cinder.service File "/opt/stack/
TRACE cinder.service self._child_
TRACE cinder.service File "/opt/stack/
TRACE cinder.service launcher.
TRACE cinder.service File "/opt/stack/
TRACE cinder.service server.start()
TRACE cinder.service File "/opt/stack/
TRACE cinder.service self.manager.
TRACE cinder.service File "/opt/stack/
TRACE cinder.service self.publish_
TRACE cinder.service File "/opt/stack/
TRACE cinder.service self._report_
TRACE cinder.service File "/opt/stack/
TRACE cinder.service volume_stats = self.driver.
TRACE cinder.service File "/opt/stack/
TRACE cinder.service self._update_
TRACE cinder.service File "/opt/stack/
TRACE cinder.service data['total_
TRACE cinder.service ValueError: invalid literal for float(): 0,52
A fix is available and submitted for review at: https:/
Changed in cinder: | |
assignee: | nobody → Christoph Kassen (c-kassen) |
status: | New → In Progress |
Changed in cinder: | |
milestone: | none → grizzly-rc1 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | grizzly-rc1 → 2013.1 |
Reviewed: https:/ /review. openstack. org/23720 github. com/openstack/ cinder/ commit/ 6c8d860507a6642 4cf47b46380478b 3cc565359e
Committed: http://
Submitter: Jenkins
Branch: master
commit 6c8d860507a6642 4cf47b46380478b 3cc565359e
Author: Christoph Kassen <email address hidden>
Date: Wed Mar 6 19:37:42 2013 +0100
Fix volume capacity reporting
cinder-volume crashes when the decimal point is not represented by a dot
but by a comma instead. This crash happens for example with the de_DE
locale.
This change replaces any comma appearing in the vgs command output with
a dot.
Test case added.
Fixes: bug #1151684 a8560688ec4c25d 766e92ee0f0
Change-Id: I831055fb7fd206