fix: try to rescue Net::SSH::Disconnect#536
Conversation
1 similar comment
|
Have you checked if chef exits on disconnect? If not, seems like retry could be problematic |
|
In my case, it does not exist. However, risk exists as |
|
That's surprising to see that part of the run take so long. Anyway if it helps your situation I'd be fine with a configurable retry. But seems risky as a default. |
|
It also surprises me too. I am going to conduct another investigation why it takes some much time. Considering this error should not be a common case, and this fix is not a proper fix, |
|
Yeah I don't see an issue if it's configurable and off by default.
On Sun, Dec 23, 2018 at 23:40 Xuanzhong Wei ***@***.***> wrote:
It also surprises me too. I am going to conduct another investigation why
it takes some much time.
*Maybe resolving dependencies part and rsync part.*
Considering this error should not be a common case, and this fix is not a
proper fix,
I will try to add an option to support this workaround. Does it sound good
to you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#536 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAACsjMd0VGgrzOs_9yVY0juTECYF07zks5u75XOgaJpZM4ZftGB>
.
--
…-Mat
matschaffer.com
|
Hi @matschaffer,
I sometimes encounter
Net::SSH::Disconnectwhen trying to runchef-soloon slow machines.After some investigation, I found that the server indeed closed the connection since it has been idle for a while. The reason why the connection becomes idle is simply that the machine (
chef-soloruns on) is slow and sometimes it takes time to do works. Hence, I try to set thessh_keepaliveandssh_keepalive_intervalto a reasonable value in order to send keepalive message when the connection is idle. However it does not work as expected.As the investigation goes, I found that
keepaliveandkeepalive_intervalonly work for the case that you are running a slow command on the remote or you doNet::SSH::Session::loopbecausenet-sshis based on event and so is the keepalive ofnet-ssh. I am not sure if there is any way to keep the connection alive and reuse the connection efficiently.However, it may be good to rescue from
Net::SSH::Disconnectand retry the command. The caveat is that a command might be executed on the remote more than once.Not sure are these issues are related to this one. #272 #332