Activity log for bug #1067683

Date Who What changed Old value New value Message
2012-10-17 10:33:10 ryuta sekine bug added bug
2012-10-17 10:36:03 ryuta sekine description Now, when unique constraint error occured, sqlalchemy.exc.IntegrityError is raised without entering through the else branch if statement. Exception eventually receive nova.exception.DBError, because it is rapped in get_session() of nova/db/sqlalchemy/session.py def save(self, session=None): """Save this object.""" if not session: session = get_session() session.add(self) try: session.flush() except IntegrityError, e: if str(e).endswith('is not unique'): raise exception.Duplicate(str(e)) else: raise 【error log】 ====================================================================== FAIL: test_session_flush_on_integrity_violation() ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/stack/tempest/tempest/manual_tests/negative_st/test_negative_sqlalchemy.py", line 159, in test_session_flush_on_integrity_violation self.assertEqual(exception.Duplicate, inner_ex.__class__) AssertionError: <class 'nova.exception.Duplicate'> != <class 'sqlalchemy.exc.IntegrityError'> -------------------- >> begin captured logging << -------------------- tempest.config: INFO: Using tempest config file /opt/stack/tempest/etc/tempest.conf nova.exception: ERROR: DB exception wrapped. Traceback (most recent call last): File "/opt/stack/nova/nova/exception.py", line 68, in _wrap return f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1547, in flush self._flush(objects) File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1616, in _flush flush_context.execute() File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 328, in execute rec.execute(self) File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 472, in execute uow File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 2264, in _save_obj execute(statement, multiparams) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in execute params) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1538, in _execute_clauseelement compiled_sql, distilled_params File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1646, in _execute_context context) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1639, in _execute_context context) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 330, in do_execute cursor.execute(statement, parameters) File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute self.errorhandler(self, exc, value) File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue IntegrityError: (IntegrityError) (1062, "Duplicate entry '9' for key 'PRIMARY'") 'INSERT INTO services (created_at, updated_at, deleted_at, deleted, id, host, `binary`, topic, report_count, disabled, availability_zone) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2012, 9, 13, 2, 16, 22, 105645), None, None, 0, 9L, None, None, None, 0, 0, 'nova') Reason of bug seems to be to coming out of sqlarchemy error without being rapped in a nova. I think should return nova.exception.Duplicate. Now, when unique constraint error occured, sqlalchemy.exc.IntegrityError is raised without entering through the else branch if statement. Exception eventually receive nova.exception.DBError, because it is rapped in get_session() of nova/db/sqlalchemy/session.py def save(self, session=None):     """Save this object."""     if not session:         session = get_session()     session.add(self)     try:         session.flush()     except IntegrityError, e:         if str(e).endswith('is not unique'):             raise exception.Duplicate(str(e))         else:             raise 【error log】 ====================================================================== FAIL: test_session_flush_on_integrity_violation() ---------------------------------------------------------------------- Traceback (most recent call last):   File "/opt/stack/tempest/tempest/manual_tests/negative_st/test_negative_sqlalchemy.py", line 159, in test_session_flush_on_integrity_violation     self.assertEqual(exception.Duplicate, inner_ex.__class__) AssertionError: <class 'nova.exception.Duplicate'> != <class 'sqlalchemy.exc.IntegrityError'> -------------------- >> begin captured logging << -------------------- tempest.config: INFO: Using tempest config file /opt/stack/tempest/etc/tempest.conf nova.exception: ERROR: DB exception wrapped. Traceback (most recent call last):   File "/opt/stack/nova/nova/exception.py", line 68, in _wrap     return f(*args, **kwargs)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1547, in flush     self._flush(objects)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1616, in _flush     flush_context.execute()   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 328, in execute     rec.execute(self)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 472, in execute     uow   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 2264, in _save_obj     execute(statement, multiparams)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in execute     params)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1538, in _execute_clauseelement     compiled_sql, distilled_params   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1646, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1639, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 330, in do_execute     cursor.execute(statement, parameters)   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute     self.errorhandler(self, exc, value)   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler     raise errorclass, errorvalue IntegrityError: (IntegrityError) (1062, "Duplicate entry '9' for key 'PRIMARY'") 'INSERT INTO services (created_at, updated_at, deleted_at, deleted, id, host, `binary`, topic, report_count, disabled, availability_zone) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2012, 9, 13, 2, 16, 22, 105645), None, None, 0, 9L, None, None, None, 0, 0, 'nova') Reason of bug seems to be to coming out of sqlarchemy error without being rapped in anova. I think should return nova.exception.Duplicate.
2012-10-17 10:36:28 ryuta sekine description Now, when unique constraint error occured, sqlalchemy.exc.IntegrityError is raised without entering through the else branch if statement. Exception eventually receive nova.exception.DBError, because it is rapped in get_session() of nova/db/sqlalchemy/session.py def save(self, session=None):     """Save this object."""     if not session:         session = get_session()     session.add(self)     try:         session.flush()     except IntegrityError, e:         if str(e).endswith('is not unique'):             raise exception.Duplicate(str(e))         else:             raise 【error log】 ====================================================================== FAIL: test_session_flush_on_integrity_violation() ---------------------------------------------------------------------- Traceback (most recent call last):   File "/opt/stack/tempest/tempest/manual_tests/negative_st/test_negative_sqlalchemy.py", line 159, in test_session_flush_on_integrity_violation     self.assertEqual(exception.Duplicate, inner_ex.__class__) AssertionError: <class 'nova.exception.Duplicate'> != <class 'sqlalchemy.exc.IntegrityError'> -------------------- >> begin captured logging << -------------------- tempest.config: INFO: Using tempest config file /opt/stack/tempest/etc/tempest.conf nova.exception: ERROR: DB exception wrapped. Traceback (most recent call last):   File "/opt/stack/nova/nova/exception.py", line 68, in _wrap     return f(*args, **kwargs)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1547, in flush     self._flush(objects)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1616, in _flush     flush_context.execute()   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 328, in execute     rec.execute(self)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 472, in execute     uow   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 2264, in _save_obj     execute(statement, multiparams)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in execute     params)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1538, in _execute_clauseelement     compiled_sql, distilled_params   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1646, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1639, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 330, in do_execute     cursor.execute(statement, parameters)   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute     self.errorhandler(self, exc, value)   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler     raise errorclass, errorvalue IntegrityError: (IntegrityError) (1062, "Duplicate entry '9' for key 'PRIMARY'") 'INSERT INTO services (created_at, updated_at, deleted_at, deleted, id, host, `binary`, topic, report_count, disabled, availability_zone) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2012, 9, 13, 2, 16, 22, 105645), None, None, 0, 9L, None, None, None, 0, 0, 'nova') Reason of bug seems to be to coming out of sqlarchemy error without being rapped in anova. I think should return nova.exception.Duplicate. Now, when unique constraint error occured, sqlalchemy.exc.IntegrityError is raised without entering through the else branch if statement. Exception eventually receive nova.exception.DBError, because it is rapped in get_session() of nova/db/sqlalchemy/session.py def save(self, session=None):     """Save this object."""     if not session:         session = get_session()     session.add(self)     try:         session.flush()     except IntegrityError, e:         if str(e).endswith('is not unique'):             raise exception.Duplicate(str(e))         else:             raise 【error log】 ====================================================================== FAIL: test_session_flush_on_integrity_violation() ---------------------------------------------------------------------- Traceback (most recent call last):   File "/opt/stack/tempest/tempest/manual_tests/negative_st/test_negative_sqlalchemy.py", line 159, in test_session_flush_on_integrity_violation     self.assertEqual(exception.Duplicate, inner_ex.__class__) AssertionError: <class 'nova.exception.Duplicate'> != <class 'sqlalchemy.exc.IntegrityError'> -------------------- >> begin captured logging << -------------------- tempest.config: INFO: Using tempest config file /opt/stack/tempest/etc/tempest.conf nova.exception: ERROR: DB exception wrapped. Traceback (most recent call last):   File "/opt/stack/nova/nova/exception.py", line 68, in _wrap     return f(*args, **kwargs)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1547, in flush     self._flush(objects)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1616, in _flush     flush_context.execute()   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 328, in execute     rec.execute(self)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 472, in execute     uow   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 2264, in _save_obj     execute(statement, multiparams)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in execute     params)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1538, in _execute_clauseelement     compiled_sql, distilled_params   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1646, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1639, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 330, in do_execute     cursor.execute(statement, parameters)   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute     self.errorhandler(self, exc, value)   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler     raise errorclass, errorvalue IntegrityError: (IntegrityError) (1062, "Duplicate entry '9' for key 'PRIMARY'") 'INSERT INTO services (created_at, updated_at, deleted_at, deleted, id, host, `binary`, topic, report_count, disabled, availability_zone) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2012, 9, 13, 2, 16, 22, 105645), None, None, 0, 9L, None, None, None, 0, 0, 'nova') Reason of bug seems to be to coming out of sqlarchemy error without being rapped in a nova. I think should return nova.exception.Duplicate.
2012-10-17 10:37:07 ryuta sekine description Now, when unique constraint error occured, sqlalchemy.exc.IntegrityError is raised without entering through the else branch if statement. Exception eventually receive nova.exception.DBError, because it is rapped in get_session() of nova/db/sqlalchemy/session.py def save(self, session=None):     """Save this object."""     if not session:         session = get_session()     session.add(self)     try:         session.flush()     except IntegrityError, e:         if str(e).endswith('is not unique'):             raise exception.Duplicate(str(e))         else:             raise 【error log】 ====================================================================== FAIL: test_session_flush_on_integrity_violation() ---------------------------------------------------------------------- Traceback (most recent call last):   File "/opt/stack/tempest/tempest/manual_tests/negative_st/test_negative_sqlalchemy.py", line 159, in test_session_flush_on_integrity_violation     self.assertEqual(exception.Duplicate, inner_ex.__class__) AssertionError: <class 'nova.exception.Duplicate'> != <class 'sqlalchemy.exc.IntegrityError'> -------------------- >> begin captured logging << -------------------- tempest.config: INFO: Using tempest config file /opt/stack/tempest/etc/tempest.conf nova.exception: ERROR: DB exception wrapped. Traceback (most recent call last):   File "/opt/stack/nova/nova/exception.py", line 68, in _wrap     return f(*args, **kwargs)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1547, in flush     self._flush(objects)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1616, in _flush     flush_context.execute()   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 328, in execute     rec.execute(self)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 472, in execute     uow   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 2264, in _save_obj     execute(statement, multiparams)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in execute     params)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1538, in _execute_clauseelement     compiled_sql, distilled_params   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1646, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1639, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 330, in do_execute     cursor.execute(statement, parameters)   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute     self.errorhandler(self, exc, value)   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler     raise errorclass, errorvalue IntegrityError: (IntegrityError) (1062, "Duplicate entry '9' for key 'PRIMARY'") 'INSERT INTO services (created_at, updated_at, deleted_at, deleted, id, host, `binary`, topic, report_count, disabled, availability_zone) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2012, 9, 13, 2, 16, 22, 105645), None, None, 0, 9L, None, None, None, 0, 0, 'nova') Reason of bug seems to be to coming out of sqlarchemy error without being rapped in a nova. I think should return nova.exception.Duplicate. Now, when unique constraint error occured, sqlalchemy.exc.IntegrityError is raised without entering through the else branch if statement. Exception eventually receive nova.exception.DBError, because it is rapped in get_session() of nova/db/sqlalchemy/session.py def save(self, session=None):     """Save this object."""     if not session:         session = get_session()     session.add(self)     try:         session.flush()     except IntegrityError, e:         if str(e).endswith('is not unique'):             raise exception.Duplicate(str(e))         else:             raise [error log] ====================================================================== FAIL: test_session_flush_on_integrity_violation() ---------------------------------------------------------------------- Traceback (most recent call last):   File "/opt/stack/tempest/tempest/manual_tests/negative_st/test_negative_sqlalchemy.py", line 159, in test_session_flush_on_integrity_violation     self.assertEqual(exception.Duplicate, inner_ex.__class__) AssertionError: <class 'nova.exception.Duplicate'> != <class 'sqlalchemy.exc.IntegrityError'> -------------------- >> begin captured logging << -------------------- tempest.config: INFO: Using tempest config file /opt/stack/tempest/etc/tempest.conf nova.exception: ERROR: DB exception wrapped. Traceback (most recent call last):   File "/opt/stack/nova/nova/exception.py", line 68, in _wrap     return f(*args, **kwargs)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1547, in flush     self._flush(objects)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1616, in _flush     flush_context.execute()   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 328, in execute     rec.execute(self)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 472, in execute     uow   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 2264, in _save_obj     execute(statement, multiparams)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in execute     params)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1538, in _execute_clauseelement     compiled_sql, distilled_params   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1646, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1639, in _execute_context     context)   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 330, in do_execute     cursor.execute(statement, parameters)   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute     self.errorhandler(self, exc, value)   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler     raise errorclass, errorvalue IntegrityError: (IntegrityError) (1062, "Duplicate entry '9' for key 'PRIMARY'") 'INSERT INTO services (created_at, updated_at, deleted_at, deleted, id, host, `binary`, topic, report_count, disabled, availability_zone) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2012, 9, 13, 2, 16, 22, 105645), None, None, 0, 9L, None, None, None, 0, 0, 'nova') Reason of bug seems to be to coming out of sqlarchemy error without being rapped in a nova. I think should return nova.exception.Duplicate.
2012-10-17 10:44:56 ryuta sekine openstack-ci: status New Invalid
2012-10-17 10:47:14 ryuta sekine openstack-ci: status Invalid New
2012-10-17 10:47:37 ryuta sekine affects openstack-ci nova
2012-11-14 20:09:18 Chuck Short nova: status New Incomplete
2012-12-13 11:19:59 Thierry Carrez nova: status Incomplete New
2013-02-26 02:05:08 Russell Bryant tags db
2013-02-26 02:05:25 Russell Bryant bug added subscriber Boris Pavlovic
2013-02-27 00:31:17 Vish Ishaya nominated for series nova/folsom
2013-02-27 00:31:17 Vish Ishaya bug task added nova/folsom
2013-02-27 00:31:27 Vish Ishaya nova: status New Fix Released
2013-02-27 00:31:33 Vish Ishaya nova: importance Undecided High
2013-02-27 00:31:43 Vish Ishaya nova: assignee Boris Pavlovic (boris-42)
2013-02-27 00:32:16 Vish Ishaya nova/folsom: status New Triaged
2013-02-27 00:32:19 Vish Ishaya nova/folsom: importance Undecided High
2013-02-27 00:39:14 OpenStack Infra nova/folsom: status Triaged In Progress
2013-02-27 00:39:14 OpenStack Infra nova/folsom: assignee Vish Ishaya (vishvananda)
2013-03-04 11:04:51 Thierry Carrez nova: milestone grizzly-2
2013-04-04 11:01:32 Thierry Carrez nova: milestone grizzly-2 2013.1
2014-09-19 11:01:53 Sean Dague bug task deleted nova/folsom