Reindex and timeout (was: Reindexing and chef-client)


#1

This reminded me of a problem I had. Wondering if it is common. I had
to do an index rebuild and the knife command kept timing out because
the rebuild takes a while. I didn’t see a way to tell knife to use a
longer timeout to wait for the response.
Is there a way?
Should this not happen?
Should this be implemented as an async call instead?

Turns out the index rebuild did eventually finish successfully, but I
could only tell by the results and looking at the server logs. Since
the rebuild is actually separate calls for each index I’m worried that
if it gets too long, the later calls might not ever be made and index
rebuilding would become impossible to complete.

KC

On Wednesday, February 22, 2012, Jesse Nelson spheromak@gmail.com
wrote:

Couple things I can think of:

You can block server’s API port with iptables. Causing node client
runs to fail, but not change anything.

Add to all nodes runlist in the front a recipe that simply ends the
run with node.exit. Till you’re done with your upgrade of course.

Knife ssh disable all your clients :slight_smile:

I am sure there are more!


#2

On Friday, February 24, 2012 at 12:40 PM, KC Braunschweig wrote:

This reminded me of a problem I had. Wondering if it is common. I had
to do an index rebuild and the knife command kept timing out because
the rebuild takes a while. I didn’t see a way to tell knife to use a
longer timeout to wait for the response.
Is there a way?
Should this not happen?
Should this be implemented as an async call instead?

If it was async, there’s a greater chance it would fail without you knowing about it. I could see the value in creating some sort of background job document and polling for the status, but that’s a pretty large leap in complexity.

If you want to increase your timeout, the setting is rest_timeout which defaults to 300s.


Dan DeLeo