[openstack-dev] [ceilometer-client] query option discard special characters

ZhiQiang Fan aji.zqfan at gmail.com
Wed Apr 30 09:29:18 UTC 2014


Hi, developers,

I find that ceilometer-client applies strict rule on query option,
particularly, some special characters are not supported in key:value pairs,
such as ~, !, and etc

the regular expression used in ceilometerclient/v2/options.py is:
r'([[a-zA-Z0-9_.]+)([><!]=)([^ -,\t\n\r\f\v]+)'

which means, key and value cannot have spaces and special characters.

But, glance and nova (may be more projects) allow special characters in
names and/or metadatas, please read bug report
https://bugs.launchpad.net/python-ceilometerclient/+bug/1314544 for more
detail

So, if we create resources in glance and nova, it may not be able to be
filtered out in ceilometer

for i.e.
# ceilometer sample-list -m instance -q 'metadata.display_name=special!key'
# ceilometer sample-list -m instance -q 'metadata.display_name=vm name'

the worse case is ceilometer-client will send wrong field since the parser
cannot work, so it will return 400 error!

I think ceilometer-client should not be so strict.

Any opinion?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140430/1f001bfa/attachment.html>


More information about the OpenStack-dev mailing list