Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list index out of range in latency plugin #33

Open
bobrik opened this issue Jan 18, 2016 · 4 comments
Open

list index out of range in latency plugin #33

bobrik opened this issue Jan 18, 2016 · 4 comments

Comments

@bobrik
Copy link
Contributor

bobrik commented Jan 18, 2016

Jan 18 11:59:11 36s62 docker/9781622b6cd5[13999]: ceph: failed to get stats :: list index out of range :: Traceback (most recent call last):
Jan 18 11:59:11 36s62 docker/9781622b6cd5[13999]: File "/usr/lib/collectd/plugins/ceph/base.py", line 114, in read_callback
Jan 18 11:59:11 36s62 docker/9781622b6cd5[13999]: stats = self.get_stats()
Jan 18 11:59:11 36s62 docker/9781622b6cd5[13999]: File "/usr/lib/collectd/plugins/ceph/ceph_latency_plugin.py", line 67, in get_stats
Jan 18 11:59:11 36s62 docker/9781622b6cd5[13999]: data[ceph_cluster]['cluster']['stddev_latency'] = results[1]
Jan 18 11:59:11 36s62 docker/9781622b6cd5[13999]: IndexError: list index out of range
Jan 18 11:59:11 36s62 docker/9781622b6cd5[13999]:
Jan 18 11:59:11 36s62 docker/9781622b6cd5[13999]: Unhandled python exception in read callback: UnboundLocalError: local variable 'stats' referenced before assignment
Jan 18 11:59:11 36s62 docker/9781622b6cd5[13999]: read-function of plugin `python.ceph.ceph_latency_plugin' failed. Will suspend it for 120.000 seconds.
@ghost
Copy link

ghost commented Feb 16, 2016

Do you have a "data" pool in your Ceph cluster? Line 54 in ceph_latency_plugin.py shows that the pool name of "data" is hardcoded.

@bobrik
Copy link
Contributor Author

bobrik commented Feb 17, 2016

Yes, I do have it. It doesn't fail all the time too.

@ghost
Copy link

ghost commented Feb 17, 2016

I changed line 54 to

"timeout 30s rados --cluster "+ self.cluster +" -p "+ self.testpool +" bench 10 write -t 1 -b 65536 2>/dev/null | grep -i latency | awk '{print 1000*$3}'", shell=True)

for testing, and since then it didn't fail anymore.

cheers
Mathias

@resyst-it
Copy link

ceph: failed to get stats :: list index out of range :: Traceback (most recent call last):#12 File "/opt/collectd/plugins/base.py", line 114, in read_callback#012 stats = self.get_stats()#12 File "/opt/collectd/plugins/ceph_latency_plugin.py", line 67, in get_stats#012 data[ceph_cluster]['cluster']['stddev_latency'] = results[1]#012IndexError: list index out of range

I have this error. I have no data pool. And i have changed the line 54 by this 👍
timeout 30s rados --cluster "+ self.cluster +" -p "+ self.testpool +" bench 10 write -t 1 -b 65536 2>/dev/null | grep -i latency | awk '{print 1000*$3}'", shell=True)

But i have this error ... Do you have an idea ?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants