Fix DBDuplicateError handling in _ensure_default_security_group
The coding in change-id Ibb0597d4db187c856f9ac1d9700701e0165c3c73
catches and ignores DBDuplicateError in a nested transaction.
It would cause another exception, InvalidRequestError, on the
next operation. ("This Session's transaction has been rolled back")
This commit fixes it.
Reviewed: https:/ /review. openstack. org/165290 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=5dccff1cb33 67f88b7a7851988 b19caad313b036
Committed: https:/
Submitter: Jenkins
Branch: master
commit 5dccff1cb3367f8 8b7a7851988b19c aad313b036
Author: YAMAMOTO Takashi <email address hidden>
Date: Wed Mar 18 11:07:09 2015 +0900
Fix DBDuplicateError handling in _ensure_ default_ security_ group
The coding in change-id Ibb0597d4db187c 856f9ac1d970070 1e0165c3c73 rror, on the
catches and ignores DBDuplicateError in a nested transaction.
It would cause another exception, InvalidRequestE
next operation. ("This Session's transaction has been rolled back")
This commit fixes it.
Also, tweak a test case to expose the error.
Closes-Bug: #1433418 2ecc6ed6842ad20 386e3785a9c
Related-Bug: #1419723
Change-Id: Ie4de271c0512fb