bd142765da
This change adds a tox targets that run upgrade testing. The two jobs have been chosen for gate testing, but other can be later added for local testing. Change-Id: I7d06847243fd3be4e8cd381205d6c21bcd087f30
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
From 7bcd2a259be0a35d9387a24329f55250efde3aec Mon Sep 17 00:00:00 2001
|
|
From: Mehdi Abaakouk <sileht@redhat.com>
|
|
Date: Mon, 12 Sep 2016 19:54:03 +0200
|
|
Subject: [PATCH] ceph: Fix metricd start
|
|
|
|
metricd can be started before api, in that case
|
|
metricd fail because the measure object don't yet exists.
|
|
|
|
Change-Id: Id7822f16718e31d6a8916cec8a6b77194071a31e
|
|
---
|
|
|
|
diff --git a/gnocchi/storage/ceph.py b/gnocchi/storage/ceph.py
|
|
index 15e1dad..d2ea4f8 100644
|
|
--- a/gnocchi/storage/ceph.py
|
|
+++ b/gnocchi/storage/ceph.py
|
|
@@ -167,8 +167,12 @@
|
|
def _list_object_names_to_process(self, prefix=""):
|
|
with rados.ReadOpCtx() as op:
|
|
omaps, ret = self.ioctx.get_omap_vals(op, "", prefix, -1)
|
|
- self.ioctx.operate_read_op(
|
|
- op, self.MEASURE_PREFIX, flag=self.OMAP_READ_FLAGS)
|
|
+ try:
|
|
+ self.ioctx.operate_read_op(
|
|
+ op, self.MEASURE_PREFIX, flag=self.OMAP_READ_FLAGS)
|
|
+ except rados.ObjectNotFound:
|
|
+ # API have still written nothing
|
|
+ return ()
|
|
# NOTE(sileht): after reading the libradospy, I'm
|
|
# not sure that ret will have the correct value
|
|
# get_omap_vals transforms the C int to python int
|