Currently if an sqlite3.DatabaseError is thrown when caused by
a corrupted database schema, it get logged and the database is isn't
quarantined.
This patch adds the malformed database schema case to the list of
SQLite errors in possibly_quarantine that will trigger the db to be
quarantined.
Also it improved the possibly_quarantined unit test to test all existing
exceptions, and catches exceptions based on the real world except we use
in code.
Closes-Bug: #1646247
Change-Id: Id9452c88f8394a2a910c34c69361442543aa206d
(cherry picked from commit 3bde14b)
Reviewed: https:/ /review. openstack. org/416090 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=ea1ecf3d8b0 97a5d24fe81f2c5 ee9ec390d41809
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit ea1ecf3d8b097a5 d24fe81f2c5ee9e c390d41809
Author: Matthew Oliver <email address hidden>
Date: Thu Dec 1 09:46:53 2016 +1100
Quarantine malformed database schema SQLite errors
Currently if an sqlite3. DatabaseError is thrown when caused by
a corrupted database schema, it get logged and the database is isn't
quarantined.
This patch adds the malformed database schema case to the list of
SQLite errors in possibly_quarantine that will trigger the db to be
quarantined.
Also it improved the possibly_ quarantined unit test to test all existing
exceptions, and catches exceptions based on the real world except we use
in code.
Closes-Bug: #1646247
Change-Id: Id9452c88f8394a 2a910c34c693614 42543aa206d
(cherry picked from commit 3bde14b)