remove resource if not created
gnocchi dispatcher will attempt to patch resource after pushing
measures. if we can't create resource, we shouldn't bother trying
to handle the patch later on. also, add better logging to figure
out which resource failed
Change-Id: Icfb2a694230d5c185a2726463657d3a11ed59fe0
(cherry picked from commit 54aea5b2d7
)
This commit is contained in:
parent
c25e934b8c
commit
1cc4068298
|
@ -419,9 +419,12 @@ class GnocchiDispatcher(dispatcher.MeterDispatcherBase,
|
|||
# NOTE(sileht): resource created in the meantime
|
||||
pass
|
||||
except gnocchi_exc.ClientException as e:
|
||||
LOG.error(six.text_type(e))
|
||||
LOG.error(_LE('Error creating resource %(id)s: %(err)s'),
|
||||
{'id': resource['id'], 'err': six.text_type(e)})
|
||||
# We cannot post measures for this resource
|
||||
# and we can't patch it later
|
||||
del measures[resource['id']]
|
||||
del resource_infos[resource['id']]
|
||||
|
||||
# NOTE(sileht): we have created missing resources/metrics,
|
||||
# now retry to post measures
|
||||
|
|
Loading…
Reference in New Issue