Got DBAPIError when nova instance failed to be created

Bug #1843979 reported by Eric Xie on 2019-09-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Manila
Undecided
Eric Xie

Bug Description

When i used generic driver to create one share, the instances waw created failed cause of image convert failure.

But in the manila-share.log got log as below:
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters [req-07c4cd9c-9154-49bb-a14d-74f8d6cbc5f1 4c31323efa7e4abf824399b63a687ff8 187e1165ec2a40e9a72efab673e940d9 - - -] DBAPIError exception wrapped from (pymysql.err.IntegrityError) (1048, u"Column 'value' cannot be null") [SQL: u'INSERT INTO share_server_backend_details (created_at, updated_at, deleted_at, deleted, `key`, value, share_server_id) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s, %(key)s, %(value)s, %(share_server_id)s)'] [parameters: {'deleted': 'False', 'created_at': datetime.datetime(2019, 9, 14, 8, 13, 51, 414970), 'updated_at': None, 'value': None, 'share_server_id': '21769eff-4260-438d-b536-28fb453250bc', 'key': 'subnet_id', 'deleted_at': None}]: IntegrityError: (1048, u"Column 'value' cannot be null")
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters context)
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 165, in execute
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters result = self._query(query)
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/cursors.py", line 321, in _query
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters conn.query(q)
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 860, in query
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters self._affected_rows = self._read_query_result(unbuffered=unbuffered)
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1061, in _read_query_result
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters result.read()
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1349, in read
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters first_packet = self.connection._read_packet()
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 1018, in _read_packet
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters packet.check_error()
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 384, in check_error
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters err.raise_mysql_exception(self._data)
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters raise errorclass(errno, errval)
2019-09-14 16:13:51.415 21885 ERROR oslo_db.sqlalchemy.exc_filters IntegrityError: (1048, u"Column 'value' cannot be null")

I think we should explict the error.

Jason Grosso (jgrosso) on 2019-09-26
tags: added: driver
Goutham Pacha Ravi (gouthamr) wrote :

Thank you for the bug report. I don't see the image conversion failure here in the log you posted. However, failing on the DB is something we should handle. Have you already worked around this situation? If yes, could you please propose a fix.

Eric Xie (eric-xie) wrote :

@Goutham, i am working on it.

Changed in manila:
assignee: nobody → Eric Xie (eric-xie)
status: New → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers