_filter_list report encode failure

Bug #1668849 reported by Liu Qing
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Shade
New
Undecided
Unassigned

Bug Description

while using ansible os_server to launch a new vm, it complains about the encoding error. This is due to we have unicode characters in vm name. I think shade is trying to find whether this vm is already in nova, but it failed to process unicode.

Traceback (most recent call last):
  File "/tmp/ansible_TdV8II/ansible_module_os_server.py", line 648, in <module>
    main()
  File "/tmp/ansible_TdV8II/ansible_module_os_server.py", line 636, in main
    _get_server_state(module, cloud)
  File "/tmp/ansible_TdV8II/ansible_module_os_server.py", line 549, in _get_server_state
    server = cloud.get_server(module.params['name'])
  File "/usr/lib/python2.7/site-packages/shade/openstackcloud.py", line 2623, in get_server
    return _utils._get_entity(searchfunc, name_or_id, filters)
  File "/usr/lib/python2.7/site-packages/shade/_utils.py", line 165, in _get_entity
    entities = func(name_or_id, filters, **kwargs)
  File "/usr/lib/python2.7/site-packages/shade/openstackcloud.py", line 1579, in search_servers
    return _utils._filter_list(servers, name_or_id, filters)
  File "/usr/lib/python2.7/site-packages/shade/_utils.py", line 109, in _filter_list
    str(e_name), str(name_or_id)))):
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstacksdk 0.10.0

This issue was fixed in the openstack/python-openstacksdk 0.10.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.