From c2ab34a8c7fac78b5a70475e02c1d61fde4585b8 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Thu, 18 Apr 2019 15:02:13 +0200 Subject: [PATCH] Do not log an exception if Allocation is deleted during handling. This is a normal situation and should not report a traceback. Change-Id: I497d3aaae91e8aa87649323874121eb6e81c5fd8 --- ironic/conductor/allocations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ironic/conductor/allocations.py b/ironic/conductor/allocations.py index 5c1a7024a21..216a4cb6f1f 100644 --- a/ironic/conductor/allocations.py +++ b/ironic/conductor/allocations.py @@ -90,6 +90,8 @@ def _allocation_failed(allocation, reason): allocation.state = states.ERROR allocation.last_error = str(reason) allocation.save() + except exception.AllocationNotFound as exc: + LOG.debug('Not saving a failed allocation: %s', exc) except Exception: LOG.exception('Could not save the failed allocation %s', allocation.uuid)