← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1549705] Re: migrate DB failed due to password cannot be null

 

Reviewed:  https://review.openstack.org/285152
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=65dc3e01aebe2cfe53ef1b9883876247414ea83e
Submitter: Jenkins
Branch:    master

commit 65dc3e01aebe2cfe53ef1b9883876247414ea83e
Author: Dave Chen <wei.d.chen@xxxxxxxxx>
Date:   Fri Feb 26 15:03:51 2016 +0800

    Fix the migration issue for the user doesn't have a password
    
    If user doesn't have a password, the migration 091 will fail, this is
    because the `password` table doesn't allow the `password`
    field to be null.
    
    There is no need to insert an empty entry into `password`
    table. The user not reference with any `password` instance will imply
    the `user` doesn't have a password.
    
    This patch also fixes the case that the user from `user` table already
    exists in `local_user` table and result in `DBDuplicateEntry` exception
    due to the bug #1549705.
    
    Change-Id: I4db73ee673573ab63b36bf092c17f8ba64605939
    Closes-Bug: #1549705


** Changed in: keystone
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1549705

Title:
  migrate DB failed due to password cannot be null

Status in OpenStack Identity (keystone):
  Fix Released

Bug description:
  If there were user with null password existes,  keystone-manage
  db_sync will fail when migrate the DB to
  091_migrate_data_to_local_user_and_password_tables.py.

  This is beacuse the `password` doesn't allow the the `password` to be
  null.

  The stacktrace is,

  2016-02-25 16:48:02.187 16248 TRACE keystone     _check_mysql_exception(errinfo)
  2016-02-25 16:48:02.187 16248 TRACE keystone   File "/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 112, in _check_mysql_exception
  2016-02-25 16:48:02.187 16248 TRACE keystone     raise errorclass(errno, errorvalue)
  2016-02-25 16:48:02.187 16248 TRACE keystone DBError: (pymysql.err.IntegrityError) (1048, u"Column 'password' cannot be null") [SQL: u'INSERT INTO password (local_user_id, password) VALUES (%(local_user_id_0)s, %(password_0)s), (%(local_user_id_1)s, %(password_1)s), (%(local_user_id_2)s, %(password_2)s), (%(local_user_id_3)s, %(password_3)s), (%(local_user_id_4)s, %(password_4)s), (%(local_user_id_5)s, %(password_5)s), (%(local_user_id_6)s, %(password_6)s)'] [parameters: {u'local_user_id_5': 6, u'local_user_id_2': 3, u'password_0': u'$6$rounds=10000$9MsHCDa99KIsGgyl$ElIyqo1w.SvcmM2cg3Lml6snJ.5txHxlq63Pmu19bxpnAkvqndenOV9t0Nu0qTCoxawGCpj2pUjfxuV0fDBz4.', u'password_1': u'$6$rounds=10000$VBqe3vSR7zxy10GE$jRIqQtJQkfkRJWmzKVViChVn7NHstzcC5mJANnl7bpzQaluqz.33Q6BG5MGHyFu.hWRRz3jxoLjsgTvv2GOpa0', u'password_2': u'$6$rounds=10000$LtmUoF9GZAdPfLDo$pQ313zPsbtjB7NM7bR73Jg8V7bO2oM5LysJsi2wkjCk7nwSwoos9QJdvbVL.9rV8u/3MdcDgRY1Eu28EtahQ41', u'password_3': u'$6$rounds=10000$rjTuGfpVeLXm608/$VjjU8ShYDZT6PFKjqZvf0zUvg5P7IUlW1K1ZN6NfH2a/0hGbVkcaDqky/z7fujdRfMifKjtthpLnLCN0cPPnp1', u'password_4': u'$6$rounds=10000$KYR89pU.OwWJ9MdD$cMwW970ccn44gTISz2P9vZ3lD14zvQC6R4O7q0yLunNVcqH09RMV4o7Vr47MnkejpWKvnxYKntxrmYSmlm/yg/', u'password_5': u'$6$rounds=10000$i6WcGIGqDtNML2lX$7jSzlulHQXW2mbvYfniYvlJ.EmRjM2JxYqCaldhLVgKrULImg2Gj0ZqAmoq2xs9CgXcu5jJH1L9pCMxF4gMfM.', u'password_6': None, u'local_user_id_4': 5, u'local_user_id_1': 2, u'local_user_id_0': 1, u'local_user_id_6': 7, u'local_user_id_3': 4}]

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1549705/+subscriptions


References