summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-16 00:50:58 +0000
committerGerrit Code Review <review@openstack.org>2017-06-16 00:50:58 +0000
commit4b101f7901f278c7a79e0488925f4550f1bed155 (patch)
tree95030eaa45b450d180b7346c8736ad98872562f3
parent5e8b56f3143e044996015e90ea4b86c90c655874 (diff)
parent978df9981ff47d95222bee7841e738c64a386ad3 (diff)
Merge "Also remove amphora_health entry during house_keeping amps"
-rw-r--r--octavia/controller/housekeeping/house_keeping.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/octavia/controller/housekeeping/house_keeping.py b/octavia/controller/housekeeping/house_keeping.py
index 84516cc..81a589f 100644
--- a/octavia/controller/housekeeping/house_keeping.py
+++ b/octavia/controller/housekeeping/house_keeping.py
@@ -17,6 +17,7 @@ import datetime
17from concurrent import futures 17from concurrent import futures
18from oslo_config import cfg 18from oslo_config import cfg
19from oslo_log import log as logging 19from oslo_log import log as logging
20from sqlalchemy.orm import exc as sqlalchemy_exceptions
20 21
21from octavia.common import constants 22from octavia.common import constants
22from octavia.controller.worker import controller_worker as cw 23from octavia.controller.worker import controller_worker as cw
@@ -76,6 +77,10 @@ class DatabaseCleanup(object):
76 exp_age): 77 exp_age):
77 LOG.info('Attempting to delete Amphora id : %s', amp.id) 78 LOG.info('Attempting to delete Amphora id : %s', amp.id)
78 self.amp_repo.delete(session, id=amp.id) 79 self.amp_repo.delete(session, id=amp.id)
80 try:
81 self.amp_health_repo.delete(session, amphora_id=amp.id)
82 except sqlalchemy_exceptions.NoResultFound:
83 pass # Best effort delete, this record might not exist
79 LOG.info('Deleted Amphora id : %s' % amp.id) 84 LOG.info('Deleted Amphora id : %s' % amp.id)
80 85
81 def cleanup_load_balancers(self): 86 def cleanup_load_balancers(self):