Cannot start instance when using non-ASCII chars in user data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Low
|
Tihomir Trifonov | ||
python-novaclient |
Fix Released
|
Undecided
|
Vincent Untz |
Bug Description
(This is on essex, not sure if this occurs with folsom)
When launching an instance, and filling User data section with something like "sdsdfgrtčřýřčý
Error: There was an error submitting the form. Please try again.
That's actually a crash:
=======
Traceback:
File "/usr/lib64/
111. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib64/
40. return view_func(request, *args, **kwargs)
File "/usr/lib64/
55. return view_func(request, *args, **kwargs)
File "/usr/lib64/
40. return view_func(request, *args, **kwargs)
File "/usr/lib64/
48. return self.dispatch(
File "/usr/lib64/
69. return handler(request, *args, **kwargs)
File "/usr/lib64/
84. return self.get(self, request, *args, **kwargs)
File "/usr/lib64/
64. form, handled = self.maybe_handle()
File "/usr/lib64/
59. self.form, self.handled = form.maybe_
File "/usr/lib64/
101. exceptions.
File "/usr/lib64/
99. return form, form.handle(
File "/usr/lib64/
189. redirect=redirect)
File "/usr/lib64/
182. instance_
File "/usr/lib64/
296. min_count=
File "/usr/lib64/
498. **boot_kwargs)
File "/usr/lib64/
75. body["server"
File "/usr/lib64/
53. encoded = binascii.
Exception Type: UnicodeEncodeError at /nova/images_
Exception Value: 'ascii' codec can't encode character u'\xe9' in position 6:
ordinal not in range(128)
Request information:
GET: No GET data
POST:
count = u'1'
flavor = u'1'
name = u'sdfs'
tenant_id = u'bd06d26d95fa4
user_data = u'sdfser\
device_name = u'vda'
volume = u''
image_id = u'e6569185-
keypair = u''
csrfmiddlewaretoken = u'RwPUh3Dkq48zJ
method = u'LaunchForm'
security_groups = u'default'
=======
This is a unicode vs str-in-utf8 issue; we simply need to change the unicode string to str-in-utf8 with a .encore('utf-8') call somewhere, but I'm unsure where to do this: is novaclient expecting its input to be utf8-encoded or unicode, or should novaclient do the encoding of unicode strings itself?
I would think the former, so the fix would be in horizon. What do you think?
Changed in python-novaclient: | |
assignee: | nobody → Eric Harney (eharney) |
assignee: | Eric Harney (eharney) → nobody |
Changed in horizon: | |
assignee: | Nebula (nebula) → nobody |
Changed in horizon: | |
milestone: | grizzly-1 → grizzly-2 |
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | grizzly-2 → 2013.1 |
Changed in python-novaclient: | |
status: | Fix Committed → Fix Released |
Added Nova since the fatal error is down in novaclient. Horizon can help alleviate here, but it's worth looking at on a deeper level as well.