Murano is unable to work correctly with keystonev3 domain users

Bug #1521104 reported by Dmytro Dovbii
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Stan Lagun
Liberty
Won't Fix
Undecided
Unassigned

Bug Description

With keystone v3 configured with multi-domain support, user ids are now 64 characters
when these users try to launch an application from murano catalog we get:
Data too long for column 'user_id' at row 1"

because it is set to VARCHAR(36)

 Policy check succeeded for rule 'get_package' on target {'pa ckage_id': u'4fc0da1b40b648e7b9120ba93f4f356e'}
<134>Sep 16 12:51:34 node-30 murano-api 2015-09-16 12:51:34.297 3697 INFO eventl et.wsgi [-] 127.0.0.1 - - [16/Sep/2015 12:51:34] "GET /v1/catalog/packages/4fc0d a1b40b648e7b9120ba93f4f356e HTTP/1.1" 200 976 0.034964
<134>Sep 16 12:51:34 node-30 murano-api 2015-09-16 12:51:34.308 3697 INFO eventl et.wsgi [-] (3697) accepted ('127.0.0.1', 41312)
<131>Sep 16 12:51:34 node-30 murano-api 2015-09-16 12:51:34.337 3697 ERROR oslo. db.sqlalchemy.exc_filters [-] DBAPIError exception wrapped from (DataError) (140 6, "Data too long for column 'user_id' at row 1") 'INSERT INTO session (created, updated, id, environment_id, user_id, state, description, version) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2015, 9, 16, 12, 51, 34, 335489) , datetime.datetime(2015, 9, 16, 12, 51, 34, 335505), '85206a26a5aa4ec59baf778ad b00b7d3', '3c5b5d6697f044f9ae99e6741e5bd99d', '7d74072841592382362f7288367cbb3bd ce2243223e99c5ed11c02d1050380dd', 'opened', '{"Attributes": [], "Objects": {"def aultNetworks": {"environment": {"name": "quick-env-1-network", "?": {"type": "io .murano.resources.NeutronNetwork", "id": "91200bc59cc841faadd001be5917d61f"}}, " flat": null}, "name": "quick-env-1", "?": {"type": "io.murano.Environment", "id" : "32b248bfcb89429fa37fdbd7cade861a"}}}', 0L)
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters Traceback (mos t recent call last):
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters File "/usr/l ib64/python2.6/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_c ontext
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters context)
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters File "/usr/l ib64/python2.6/site-packages/sqlalchemy/engine/default.py", line 436, in do_exec ute
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters cursor.exe cute(statement, parameters)
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters File "/usr/l ib64/python2.6/site-packages/MySQLdb/cursors.py", line 205, in execute
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters self.error handler(self, exc, value)
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters File "/usr/l ib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorha ndler
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters raise erro rclass, errorvalue
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters DataError: (14 06, "Data too long for column 'user_id' at row 1")
2015-09-16 12:51:34.337 3697 TRACE oslo.db.sqlalchemy.exc_filters
<134>Sep 16 12:51:34 node-30 murano-api 2015-09-16 12:51:34.344 3697 INFO eventl et.wsgi [-] 127.0.0.1 - - [16/Sep/2015 12:51:34] "POST /v1/environments/3c5b5d66 97f044f9ae99e6741e5bd99d/configure HTTP/1.1" 500 1170 0.034662
<134>Sep 16 12:51:34 node-30 murano-api 2015-09-16 12:51:34.350 3697 INFO eventl et.wsgi [-] (3697) accepted ('127.0.0.1', 41313)
<132>Sep 16 12:51:34 node-30 murano-api 2015-09-16 12:51:34.356 3697 AUDIT muran o.common.policy [-] Policy check succeeded for rule 'delete_environment' on targ et {'environment_id': u'52e48a86bbff4587a554aa5a1be46c11'}
<131>Sep 16 12:51:34 node-30 murano-api 2015-09-16 12:51:34.381 3697 ERROR oslo. db.sqlalchemy.exc_filters [-] DBAPIError exception wrapped from (DataError) (140 6, "Data too long for column 'user_id' at row 1") 'INSERT INTO session (created, updated, id, environment_id, user_id, state, description, version) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2015, 9, 16, 12, 51, 34, 379943) , datetime.datetime(2015, 9, 16, 12, 51, 34, 379959), '04e11c428ebd462981aa989a1 23205eb', '52e48a86bbff4587a554aa5a1be46c11', '7d74072841592382362f7288367cbb3bd ce2243223e99c5ed11c02d1050380dd', 'opened', '{"Attributes": [], "Objects": {"def aultNetworks": {"environment": {"name": "quick-env-2-network", "?": {"type": "io .murano.resources.NeutronNetwork", "id": "634da54e1d2f4337bfc63b67524f5ff0"}}, " flat": null}, "name": "quick-env-2", "?": {"type": "io.murano.Environment", "id" : "d51508e68b944c0293c9809326d9f39d"}}}', 0L)
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters Traceback (mos t recent call last):
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters File "/usr/l ib64/python2.6/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_c ontext
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters context)
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters File "/usr/l ib64/python2.6/site-packages/sqlalchemy/engine/default.py", line 436, in do_exec ute
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters cursor.exe cute(statement, parameters)
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters File "/usr/l ib64/python2.6/site-packages/MySQLdb/cursors.py", line 205, in execute
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters self.error handler(self, exc, value)
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters File "/usr/l ib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorha ndler
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters raise erro rclass, errorvalue
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters DataError: (14 06, "Data too long for column 'user_id' at row 1")
2015-09-16 12:51:34.381 3697 TRACE oslo.db.sqlalchemy.exc_filters
<134>Sep 16 12:51:34 node-30 murano-api 2015-09-16 12:51:34.388 3697 INFO eventl et.wsgi [-] 127.0.0.1 - - [16/Sep/2015 12:51:34] "DELETE /v1/environments/52e48a 86bbff4587a554aa5a1be46c11 HTTP/1.1" 500 1170 0.036852
[root@node-30 keystone]# "Data too long for column 'user_id' at row 1"

mysql> use murano
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> describe session;
+----------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+-------+
| created | datetime | NO | | NULL | |
| updated | datetime | NO | | NULL | |
| id | varchar(36) | NO | PRI | NULL | |
| environment_id | varchar(255) | YES | MUL | NULL | |
| user_id | varchar(36) | NO | | NULL | |
| state | varchar(36) | NO | | NULL | |
| description | text | NO | | NULL | |
| version | bigint(20) | NO | | NULL | |
+----------------+--------------+------+-----+---------+-------+
8 rows in set (0.00 sec)

Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

Marking this as won't fix in stable branches, since stable branch policy forbids any db schema changes. https://wiki.openstack.org/wiki/StableBranch

summary: - murano-keystonev3-domain-user
+ Murano is unable to work correctly with keystonev3 domain users
Changed in murano:
milestone: none → mitaka-1
Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

Comment from @rduncan-t:

domain users cannot use the murano API
murano should support keystone version 3 and use and unversioned auth URL, keystone presents http 300 'multiple choices' on the unversioned endpoint.

Stan Lagun (slagun)
Changed in murano:
importance: Undecided → High
Changed in murano:
milestone: mitaka-1 → mitaka-2
Revision history for this message
Ekaterina Chernova (efedorova) wrote :

Need to reverify

Changed in murano:
assignee: nobody → Stan Lagun (slagun)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

Fix proposed to branch: master
Review: https://review.openstack.org/261959

Changed in murano:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/261959
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=64fda46806410d562bfa94d4561ecc004762299f
Submitter: Jenkins
Branch: master

commit 64fda46806410d562bfa94d4561ecc004762299f
Author: Stan Lagun <email address hidden>
Date: Mon Dec 28 14:04:16 2015 +0300

    user_id column was widened to support domain users

    The length of keystone domain users is 64 chars length
    but the columns that hold user_id were VARCHAR(36)

    Change-Id: Idcbdd49b71ff3c88cf1801362b2f51d6cb22464e
    Closes-Bug: #1521104

Changed in murano:
status: In Progress → Fix Released
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.