object create cannot handle unicode file names

Bug #1743731 reported by Vladislav Belogrudov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

Pike release,

cannot add objects that have multibyte unicode in names. Both cli and horizon are affected.
No errors in logs.

()[root@8202492a441f data]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
()[root@8202492a441f data]# ls myfile™
myfile™
()[root@8202492a441f data]# openstack container create abc
+---------------------------------------+-----------+------------------------------------+
| account | container | x-trans-id |
+---------------------------------------+-----------+------------------------------------+
| AUTH_efd522eaafc145c1a025d336f84d7b23 | abc | tx5a522ce891c445a1b45c3-005a5f1d7e |
+---------------------------------------+-----------+------------------------------------+
()[root@8202492a441f data]# openstack object create abc myfile™
u'\u2122'

Revision history for this message
clayg (clay-gerrard) wrote :

Swift can happily handle any utf-8 & url encoded path for an object name

I can't tell from the output of the openstack command line client what name/path acctually got uploaded into swift?

I'm trying to get a situation setup where i can test with python-openstackclient...

Revision history for this message
clayg (clay-gerrard) wrote :
Download full text (11.1 KiB)

ok, so it doesn't upload anything at all

ubuntu@saio:~$ openstack object create abc myfile™ --verbose --debug
START with options: [u'object', u'create', u'abc', u'myfile\u2122', u'--verbose', u'--debug']
options: Namespace(access_token='***', access_token_endpoint='', access_token_type='', auth_type='v1password', auth_url='http://saio:8080/auth/v1.0', cacert=None, cert='', client_id='', client_secret='***', cloud='', code='', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', key='', log_file=None, openid_scope='', os_beta_command=False, os_compute_api_version='', os_identity_api_version='', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', passcode='', password='***', project_domain_id='', project_domain_name='', project_id='', project_name='AUTH_test', protocol='', redirect_uri='', region_name='', remote_project_domain_id='', remote_project_domain_name='', remote_project_id='', remote_project_name='', service_provider='', service_provider_endpoint='', service_provider_entity_id='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='', user_id='', username='test:tester', verbose_level=3, verify=None)
Auth plugin v1password selected
auth_config_hook(): {'auth_type': 'v1password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', u'metering_api_version': u'2', 'auth_url': 'http://saio:8080/auth/v1.0', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', 'username': 'test:tester', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'project_name': 'AUTH_test'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'timing': False, 'password': '***', u'application_catalog_api_version': u'1', 'cacert': None, u'key_manager_api_version': u'v1', u'workflow_api_version': u'2', 'deferred_help': False, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
defaults: {u'auth_type': 'password', u'status': u'active', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', u'container_infra_api_version': u'1', u'metering_api_version': u'2', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', u'application_catalog_api_version': u'1', u'key_manager_api_version': u'v1', u'workflow_api_...

no longer affects: swift
summary: - swift cannot handle unicode file names
+ object create cannot handle unicode file names
Revision history for this message
clayg (clay-gerrard) wrote :

end of the last comment seems truncated:

python-swiftclient handles this great (of course)

ubuntu@saio:~$ swift upload abc myfile™
myfile™
ubuntu@saio:~$ swift list abc
myfile™

Revision history for this message
Tim Burke (1-tim-z) wrote :
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.