sensu-influxdb-extension icon indicating copy to clipboard operation
sensu-influxdb-extension copied to clipboard

* adding yield at end of run block, to allow sensu-server shutdown

Open sethcall opened this issue 10 years ago • 5 comments

Without adding this yield, I could never shutdown sensu-server using /etc/init.d/sensu-server restart

In the logs, you'd see this, where handlers_in_progress_count would be a higher value, depending on how many influxdb handler calls were made.

This patch allows me to restart OK.

{"timestamp":"2014-12-26T17:41:42.569722+0000","level":"warn","message":"received signal","signal":"TERM"}
{"timestamp":"2014-12-26T17:41:42.570002+0000","level":"warn","message":"stopping"}
{"timestamp":"2014-12-26T17:41:42.570101+0000","level":"warn","message":"unsubscribing from keepalive and result queues"}
{"timestamp":"2014-12-26T17:41:42.570391+0000","level":"warn","message":"resigning as master"}
{"timestamp":"2014-12-26T17:41:42.570501+0000","level":"info","message":"completing handlers in progress","handlers_in_progress_count":2}

sethcall avatar Dec 26 '14 18:12 sethcall

Also fixing issue where time posted to influx was in milliseconds, not microseconds.

sethcall avatar Dec 27 '14 04:12 sethcall

Hello @sethcall

Can you separate this into 2 pull requests?

Also is yield still necessary ? I was told on #sensu at freenode.org that its no longer necessary. I tested and saw no difference, what version of sensu are you running ?

alfredopalhares avatar Jan 16 '15 11:01 alfredopalhares

Thanks for this extension! Just wanted to say that I had to add the yield when using sensu 0.19.2 before the server would restart properly.

roobert avatar Jul 08 '15 07:07 roobert

:+1: Same bug with Sensu 0.20.1 with the extension@master

# service sensu-server stop
 * Stopping sensu-server
 * Timed out waiting for sensu-server to stop
# sensu-server -V
0.20.1

BarthV avatar Jul 30 '15 10:07 BarthV

@sethcall can you rebase with master? Could you also reword the commits by removing the * and place the verbs in the infinitive ?

alfredopalhares avatar Jul 30 '15 11:07 alfredopalhares