mirror of
https://github.com/ceph/ceph
synced 2024-12-29 15:03:33 +00:00
Merge PR #25058 into master
* refs/pull/25058/head: mgr: Fixed devicehealth plugin resource leak Reviewed-by: Kefu Chai <kchai@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
9b3d909046
@ -399,7 +399,9 @@ class Module(MgrModule):
|
|||||||
# fetch metrics
|
# fetch metrics
|
||||||
res = {}
|
res = {}
|
||||||
ioctx = self.open_connection(create_if_missing=False)
|
ioctx = self.open_connection(create_if_missing=False)
|
||||||
if ioctx:
|
if not ioctx:
|
||||||
|
return 0, json.dumps(res, indent=4), ''
|
||||||
|
with ioctx:
|
||||||
with rados.ReadOpCtx() as op:
|
with rados.ReadOpCtx() as op:
|
||||||
omap_iter, ret = ioctx.get_omap_vals(op, "", sample or '', 500) # fixme
|
omap_iter, ret = ioctx.get_omap_vals(op, "", sample or '', 500) # fixme
|
||||||
assert ret == 0
|
assert ret == 0
|
||||||
|
Loading…
Reference in New Issue
Block a user