Handle OSD index errors during stats collection
This commit is contained in:
parent
526a5f4a74
commit
8b93f9a80e
|
@ -350,6 +350,7 @@ def collect_ceph_stats(logger, config, zkhandler, this_node, queue):
|
||||||
elif line[0] == "+":
|
elif line[0] == "+":
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
try:
|
||||||
# If line begins with | and second entry is a digit (i.e. OSD ID)
|
# If line begins with | and second entry is a digit (i.e. OSD ID)
|
||||||
if line[0] == "|" and line[1].isdigit():
|
if line[0] == "|" and line[1].isdigit():
|
||||||
# Parse the line in Ceph 14 format
|
# Parse the line in Ceph 14 format
|
||||||
|
@ -377,6 +378,8 @@ def collect_ceph_stats(logger, config, zkhandler, this_node, queue):
|
||||||
# Otherwise, it's the header line and is ignored
|
# Otherwise, it's the header line and is ignored
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
except IndexError:
|
||||||
|
continue
|
||||||
|
|
||||||
# I don't know why 2018 me used this construct instead of a normal
|
# I don't know why 2018 me used this construct instead of a normal
|
||||||
# dictionary update, but it works so not changing it.
|
# dictionary update, but it works so not changing it.
|
||||||
|
|
Loading…
Reference in New Issue