oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

Web API /next returns status 500 if node is waiting to poll

Open ktims opened this issue 9 months ago • 1 comments

When calling /next/<node> from an external service to notify Oxidized of config changes, the API sometimes responds with 500 Internal Server Error, particularly at startup.

Apparently this is due to the underlying next implementation only searching the list of nodes that aren't currently 'running' a poll job. If the node is currently 'running', then it will not be found, and this will raise which is not caught, not return nil/false which would be.

https://github.com/ytti/oxidized/blob/9594ae132dc16df41d96a487df1d7bf79bb79679/lib/oxidized/nodes.rb#L72

ktims avatar May 14 '24 19:05 ktims

I noticed the same problem as well. I implemented a fix that works in our oxidized installation

Haeki avatar Aug 28 '24 18:08 Haeki

Flagging to close this issue as it's been fixed in #3250

laf avatar Oct 27 '24 00:10 laf