Glance CLI was corrupted with unicode interaction
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Mirantis OpenStack | Status tracked in 10.0.x | |||||
10.0.x |
Fix Committed
|
High
|
Darja Shakhray |
Bug Description
Detailed bug description:
Glance CLI client return a 'UnicodeEncodeE
Steps to reproduce:
1. Make ssh to controller.
2. Use command:
. openrc && env PYTHONIOENCODIN
Expected results:
root@node-1:~# . openrc && env PYTHONIOENCODIN
+------
| Property | Value |
+------
| checksum | None |
| container_format | None |
| created_at | 2016-04-
| deleted | False |
| deleted_at | None |
| disk_format | None |
| id | b3da0f6e-
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | kek_1 |
| owner | eeb47d2783794ea
| protected | False |
| size | 0 |
| status | queued |
| updated_at | 2016-04-
| virtual_size | None |
+------
Actual result:
root@node-1:~# glance --debug --os-image-
Traceback (most recent call last):
File "/usr/lib/
args.
File "/usr/lib/
return func(gc, args)
File "/usr/lib/
image = gc.images.
File "/usr/lib/
data=
File "/usr/lib/
return self.request(url, 'POST', **kwargs)
File "/usr/lib/
**kwargs)
File "/usr/lib/
return self.session.
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
resp = send(**kwargs)
File "/usr/lib/
resp = self.session.
File "/usr/lib/
resp = self.send(prep, **send_kwargs)
File "/usr/lib/
r = adapter.
File "/usr/lib/
timeout=timeout
File "/usr/lib/
body=body, headers=headers)
File "/usr/lib/
conn.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
hdr = '%s: %s' % (header, '\r\n\t'
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
Reproducibility:
Only with using API v1 ( --os-image-
Workaround:
Use v2 or Horizon to work with images.
Impact:
-
Description of the environment:
- Glance python client version:
root@
2.0.0
- Shotgun2 report: http://
- MOS/Fuel: mitaka-9.0-229
Additional information:
Package version: python-
bug on upstream: https:/ /bugs.launchpad .net/python- glanceclient/ +bug/1574587