diff options
author | Kevin Benton <blak111@gmail.com> | 2014-10-02 11:26:50 -0700 |
---|---|---|
committer | Kevin Benton <blak111@gmail.com> | 2014-11-18 21:41:13 -0800 |
commit | ba647cae2932cda338441bc1f47e0668bba6b555 (patch) | |
tree | e46f469255dbe882bff4e00aa830642da1da5a04 /neutron/plugins/bigswitch/servermanager.py | |
parent | 6c476224f62770679f779dc6c13be3879b3a5ed8 (diff) | |
download | neutron-ba647cae2932cda338441bc1f47e0668bba6b555.tar.gz |
BSN: Set inconsistency record on delete failure
Set a bad value in the consistency DB on a delete
failure so a sync is triggered the next time the backend
servers become available.
This fixes the issue where the backend servers are unavailable
when an object is deleted from ML2 but not deleted from the
backend.
Conflicts:
neutron/tests/unit/bigswitch/test_servermanager.py
Closes-Bug: #1377350
Change-Id: I24713a03af4d3499645241f900de1f572689c235
(cherry picked from commit e9f001a63a555f067c4567a88613d14853442524)
Diffstat (limited to 'neutron/plugins/bigswitch/servermanager.py')
-rw-r--r-- | neutron/plugins/bigswitch/servermanager.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/neutron/plugins/bigswitch/servermanager.py b/neutron/plugins/bigswitch/servermanager.py index c10ce72bb5..7b43ccfbcd 100644 --- a/neutron/plugins/bigswitch/servermanager.py +++ b/neutron/plugins/bigswitch/servermanager.py @@ -473,6 +473,13 @@ class ServerPool(object): 'data': ret[3]}) active_server.failed = True + # A failure on a delete means the object is gone from Neutron but not + # from the controller. Set the consistency hash to a bad value to + # trigger a sync on the next check. + # NOTE: The hash must have a comma in it otherwise it will be ignored + # by the backend. + if action == 'DELETE': + hash_handler.put_hash('INCONSISTENT,INCONSISTENT') # All servers failed, reset server list and try again next time LOG.error(_('ServerProxy: %(action)s failure for all servers: ' '%(server)r'), |