Neutron cli does not support non-ASCII symbols in resource's names

Bug #1529607 reported by Stanislav Kolenkin
268
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Confirmed
Medium
MOS Neutron
6.0.x
Confirmed
Medium
MOS Maintenance
6.1.x
Confirmed
Medium
MOS Maintenance
7.0.x
Confirmed
Medium
MOS Maintenance
8.0.x
Confirmed
Medium
MOS Neutron
9.x
Confirmed
Medium
MOS Neutron

Bug Description

Neutron cli does not support non-ASCII symbols in resource's names.
Customer-found on MOS 7.0

neutron subnet-list
'ascii' codec can't encode character u'\ufffc' in position 8303: ordinal not in range(128)

python-based CLI stuff breaks up because of unsupported symbols is not related to openstack. But the fact that user is allowed to create such entities with unsupported symbols into Horizon is definitely related to OpenStack! User-oriented Web-interface should resist to user's attempts to do it.

# neutron -v subnet-list
.....
ERROR: neutronclient.shell 'ascii' codec can't encode character u'\ufffc' in position 8141: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 766, in run_subcommand
return run_command(cmd, cmd_parser, sub_argv)
File "/usr/lib/python2.7/dist-packages/neutronclient/shell.py", line 101, in run_command
return cmd.run(known_args)
File "/usr/lib/python2.7/dist-packages/neutronclient/common/command.py", line 29, in run
return super(OpenStackCommand, self).run(parsed_args)
File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 92, in run
self.produce_output(parsed_args, column_names, data)
File "/usr/lib/python2.7/dist-packages/cliff/lister.py", line 56, in produce_output
parsed_args,
File "/usr/lib/python2.7/dist-packages/cliff/formatters/table.py", line 56, in emit_list
stdout.write(formatted)
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffc' in position 8141: ordinal not in range(128)
'ascii' codec can't encode character u'\ufffc' in position 8141: ordinal not in range(128)

description: updated
summary: - Neutron does not support ASCII symbols into network's names
+ Neutron does not support non-ASCII symbols into network's names
summary: - Neutron does not support non-ASCII symbols into network's names
+ Neutron cli does not support non-ASCII symbols into network's names
summary: - Neutron cli does not support non-ASCII symbols into network's names
+ Neutron cli does not support non-ASCII symbols in resource's names
description: updated
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

Assigning to mos-horizon for evaluation.
It might be hard thing to fix on neutron side, but on horizon side some validation could be added.

The problem with the issue is that regular user may break operability of cli.
So this at least should be documented.

information type: Public → Public Security
Revision history for this message
Ilya Shakhat (shakhat) wrote :

This issue affects CLI. The reason is in environment variable LC_ALL=C.

Workaround:
# unset LC_ALL

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

From Horizon POV, it's feasible to restrict the set of allowed symbols when creating something Network-related in Horizon to just ASCII symbols. Yet, the problem will still exist in neutronclient after that.

tags: added: area-neutron
removed: neutron
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

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