** Impact **
When creating an EC2 key with binary or hex characters value ( ie: 0x,0X,0b,0B), results in a traceback:
2012-04-13 02:34:56 ERROR nova.api.ec2 [req-6bd2ab84-33b5-459d-98e8-4a113b7d7f3c e3190f0705824709b17a5b6828dd53e9 eeea40f81fe54bea956ab1ad9275c124] Unexpected error raised: invalid literal for int( ) with base 2: '0BKIF4DHWSYTSO8QGS36' 2012-04-13 02:34:56 TRACE nova.api.ec2 Traceback (most recent call last): 2012-04-13 02:34:56 TRACE nova.api.ec2 File "/usr/local/lib/python2.7/dist-packages/nova-2012.1-py2.7.egg/nova/api/ec2/__init__.py", line 582, in __call__ 2012-04-13 02:34:56 TRACE nova.api.ec2 result = api_request.invoke(context) 2012-04-13 02:34:56 TRACE nova.api.ec2 File "/usr/local/lib/python2.7/dist-packages/nova-2012.1-py2.7.egg/nova/api/ec2/apirequest.py", line 71, in invoke 2012-04-13 02:34:56 TRACE nova.api.ec2 args = ec2utils.dict_from_dotted_str(self.args.items()) 2012-04-13 02:34:56 TRACE nova.api.ec2 File "/usr/local/lib/python2.7/dist-packages/nova-2012.1-py2.7.egg/nova/api/ec2/ec2utils.py", line 221, in dict_from_dotted_str 2012-04-13 02:34:56 TRACE nova.api.ec2 value = _try_convert(value) 2012-04-13 02:34:56 TRACE nova.api.ec2 File "/usr/local/lib/python2.7/dist-packages/nova-2012.1-py2.7.egg/nova/api/ec2/ec2utils.py", line 187, in _try_convert 2012-04-13 02:34:56 TRACE nova.api.ec2 return int(value, 2) 2012-04-13 02:34:56 TRACE nova.api.ec2 ValueError: invalid literal for int() with base 2: '0BKIF4DHWSYTSO8QGS36' 2012-04-13 02:34:56 TRACE nova.api.ec2 2012-04-13 02:34:56 ERROR nova.api.ec2
** Development Fix **
This has been addressed in the development trunk at: https://review.openstack.org/6604 and fixed in quantal.
** Stable Fix **
This has been addressed in the stable/essex tree at: https://review.openstack.org/7244
** Test Case **
Run the following command:
euca-create-key 0xDD8G > tmp.key
it should not get a traceback in the nova-api.log
** Regression Potential **
Minimal, this is a corner case as well.
** Impact **
When creating an EC2 key with binary or hex characters value ( ie: 0x,0X,0b,0B), results in a traceback:
2012-04-13 02:34:56 ERROR nova.api.ec2 [req-6bd2ab84- 33b5-459d- 98e8-4a113b7d7f 3c e3190f070582470 9b17a5b6828dd53 e9 eeea40f81fe54be a956ab1ad9275c1 24] Unexpected error raised: invalid literal for int( 8QGS36' lib/python2. 7/dist- packages/ nova-2012. 1-py2.7. egg/nova/ api/ec2/ __init_ _.py", line 582, in __call__ invoke( context) lib/python2. 7/dist- packages/ nova-2012. 1-py2.7. egg/nova/ api/ec2/ apirequest. py", line 71, in invoke dict_from_ dotted_ str(self. args.items( )) lib/python2. 7/dist- packages/ nova-2012. 1-py2.7. egg/nova/ api/ec2/ ec2utils. py", line 221, in dict_from_ dotted_ str lib/python2. 7/dist- packages/ nova-2012. 1-py2.7. egg/nova/ api/ec2/ ec2utils. py", line 187, in _try_convert 8QGS36'
) with base 2: '0BKIF4DHWSYTSO
2012-04-13 02:34:56 TRACE nova.api.ec2 Traceback (most recent call last):
2012-04-13 02:34:56 TRACE nova.api.ec2 File "/usr/local/
2012-04-13 02:34:56 TRACE nova.api.ec2 result = api_request.
2012-04-13 02:34:56 TRACE nova.api.ec2 File "/usr/local/
2012-04-13 02:34:56 TRACE nova.api.ec2 args = ec2utils.
2012-04-13 02:34:56 TRACE nova.api.ec2 File "/usr/local/
2012-04-13 02:34:56 TRACE nova.api.ec2 value = _try_convert(value)
2012-04-13 02:34:56 TRACE nova.api.ec2 File "/usr/local/
2012-04-13 02:34:56 TRACE nova.api.ec2 return int(value, 2)
2012-04-13 02:34:56 TRACE nova.api.ec2 ValueError: invalid literal for int() with base 2: '0BKIF4DHWSYTSO
2012-04-13 02:34:56 TRACE nova.api.ec2
2012-04-13 02:34:56 ERROR nova.api.ec2
** Development Fix **
This has been addressed in the development trunk at: https:/ /review. openstack. org/6604 and fixed in quantal.
** Stable Fix **
This has been addressed in the stable/essex tree at: https:/ /review. openstack. org/7244
** Test Case **
Run the following command:
euca-create-key 0xDD8G > tmp.key
it should not get a traceback in the nova-api.log
** Regression Potential **
Minimal, this is a corner case as well.