canonical / prometheus-openstack-exporter

OpenStack exporter for the prometheus monitoring system
GNU General Public License v3.0
128 stars 113 forks source link

cache file issue: No such file or directory: '/home/prometheus-openstack-exporter/mycloud' #67

Closed guerol closed 1 year ago

guerol commented 5 years ago

Hi All, when I tried to start the program (dowload the last release at 25 january) for the first time, on the browser I can see this error: "Traceback (most recent call last): File "./prometheus-openstack-exporter", line 729, in do_GET collectors = [COLLECTORS[collector]() for collector in config['enabled_collectors']] File "./prometheus-openstack-exporter", line 327, in init with open(config['cache_file'], 'rb') as f: IOError: [Errno 2] No such file or directory: '/home/prometheus-openstack-exporter/mycloud'"

I think this issue is derived from an endless loop ( that not allow the writing of "mycloud" file ) in the file "prometheus-openstack-exporter", "_get_nova_info" function, line 179. The value of marker is written in search_opts['marker'] but then (line 176) the value is overwritten by "marker" value that is empty. So the loop cannot gets an end. I modified the line 179 FROM search_opts['marker'] = new_instances[-1]['id'] TO marker = new_instances[-1]['id']

Now it seems working

digitalrane commented 4 years ago

Hi, Are you still seeing this with the latest code? If so, would appreciate if you could test and submit a PR with your changes. Thanks!

Pjack commented 1 year ago

Close the issue that stale over years.