metadata type guessing code not robust
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
Medium
|
Doug Hellmann |
Bug Description
Heat is passing values to the query engine that look like expressions, but aren't. The code in the API that tries to convert the incoming value to the right type using ast is getting an unhandled SyntaxError for that case.
>>> ast.literal_
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/
node_or_string = parse(node_
File "/Library/
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 1
WWW-
We should:
1. Catch SyntaxError.
2. Not try to do type guessing if the incoming value contains punctuation characters (especially - and + since those will result in expressions, so a value like 10-1 will come out 9 and be completely wrong in all senses).
Changed in ceilometer: | |
assignee: | nobody → Doug Hellmann (doug-hellmann) |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in ceilometer: | |
milestone: | none → havana-rc1 |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | havana-rc1 → 2013.2 |
Fix proposed to branch: master /review. openstack. org/45438
Review: https:/