mercedes-benz / kosmoo

A prometheus exporter which exposes metrics about PersistentVolumes and OpenStack
MIT License
38 stars 9 forks source link

fix(loadbalancer): prevent nil pointer deref by error handling #138

Closed seanschneeweiss closed 11 months ago

seanschneeweiss commented 11 months ago

Eventually the OpenStack API is overloaded and leads to Nil Pointer Dereference. This PR introduces some error handling for failed calls.

The warning looks like this:

W0102 00:00:17.498806       1 loadbalancer.go:113] Unable to get member 16d09e83-acc5-48e3-a463-c2ebca55ccb4 of pool 2ff62d69-a61f-4d58-9858-477af1c7cb54: The service is currently unable to handle the request due to a temporary overloading or maintenance. This is a temporary condition. Try again later.