Returned strings should not be forced into unicode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Fix Released
|
High
|
Unassigned | ||
Mitaka |
Fix Released
|
High
|
Unassigned | ||
Ocata |
Fix Released
|
High
|
Unassigned | ||
Pike |
Fix Released
|
High
|
Unassigned | ||
Queens |
Fix Released
|
High
|
Unassigned | ||
oslo.versionedobjects |
Fix Released
|
High
|
Sean McGinnis | ||
python-oslo.versionedobjects (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Fix Released
|
High
|
Unassigned | ||
Artful |
Fix Released
|
High
|
Unassigned | ||
Bionic |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]
In Kilo, with ldap integrated, user_id can have non uuid format ( e.g. Gāo )
Then after upgrading kilo to mitaka ( in trusty env )
Gāo user can't create cinder volume with unicode error.
Affected Xenial, UCA Mitaka ( this is modified after i re-testing all )
Please refer to error code like below [1]
[Test Case]
1. deploy openstack env
2. source novarc ( as admin )
3. keystone user-create --name test
4. openstack user set --password-prompt test
4. log into keystone node and install mysql-client
5. connect to mysql with keystone user
6. do below query
- set foreign_key_checks = 0;
- update local_user set user_id='Gāo' where user_id='UUID';
- update user set id='Gāo' where id='UUID';
- set foreign_key_checks = 1;
7. keystone user-role-add --user test --tenant admin --role Admin
8. source novarc ( as test )
9. cinder create --name test 1
got unicode error on cinder-api node logs
[Regression Potential]
This patch make code handles unicode non uuid form user id. Basically this has little risk. but cinder-api service need to be restarted.
[Others]
[1] ###########
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
2018-03-14 10:58:56.932 2198 ERROR cinder.
Original Description
-------
Change https:/
The correct fix should be to use either six.text_type to convert it, or format it into a string as is being done, but without forcing it to be a unicode string. "%s" will end up being the correct type depending on whether it is running under py2 or py3.
Changed in oslo.versionedobjects: | |
assignee: | nobody → Sean McGinnis (sean-mcginnis) |
Changed in oslo.versionedobjects: | |
importance: | Undecided → High |
Changed in python-oslo.versionedobjects (Ubuntu Bionic): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in python-oslo.versionedobjects (Ubuntu Artful): | |
status: | New → Triaged |
Changed in python-oslo.versionedobjects (Ubuntu Xenial): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in python-oslo.versionedobjects (Ubuntu Artful): | |
importance: | Undecided → High |
description: | updated |
Fix proposed to branch: master /review. openstack. org/560639
Review: https:/