]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Catch known exceptions during deleting last HA router
authorLIU Yulong <liuyulong@letv.com>
Tue, 8 Dec 2015 06:13:44 +0000 (14:13 +0800)
committerLIU Yulong <liuyulong@letv.com>
Fri, 18 Dec 2015 08:39:27 +0000 (16:39 +0800)
commitf54cba053556a43d51ccd895cdf8232c51210299
tree83f32acc64e0611dad973fa762e8945de5902026
parenta314f3a38dc9b0efe665346089e53bee4096110b
Catch known exceptions during deleting last HA router

In some scenarios, for instance rally test create_and_delete_routers,
it will get some exceptions, such as the network in use exception,
during the router deleting api call, but actually the router has
been deleted. There has race between HA router create and delete,
if set more api and rpc worker race raises exception more frequently.
Because the inconsistent error message was not useful for user,
this patch will catch those know exceptions ObjectDeletedError,
NetworkInUse when user delete last HA router.

At the same time, when user create the first HA router, but because
of the failure of HA network creation, the router will be deleted,
then the deleting HA network will raise AttributeError, this patch
also move HA network deleting procedure under ha_network exist check
block.

Change-Id: I8cda00c1e7caffc4dfb20a817a11c60736855bb5
Closes-Bug: #1523780
Related-Bug: #1367157
neutron/db/l3_hamode_db.py
neutron/tests/unit/db/test_l3_hamode_db.py