Project

General

Profile

Bug #13491

Rebooting a host from the script immediately causes Net::SSH:Disconect error and not finishing the task properly

Added by Ivan Necas over 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Smart Proxy - SSH

Description

1. run `reboot` as a custom command
2. the task is pending, even though the machine is already restating

Ideally, I would like to somehow finish the script gracefully, even when I want to reboot the machine.
The best solution so far is `shutdown -r +1`, but there is still 1 minute delay. Anyway,
for unexpected disconnections, we need to handle the reporting properly.

Associated revisions

Revision 734b8b6f (diff)
Added by Ivan Necas over 6 years ago

Fixes #13491 - handle ssh disconnection

For example, when rebooting as part for the script.

Revision 43f2503c (diff)
Added by Ivan Necas over 6 years ago

Fixes #13491 - detect expected disconnections and don't fail on them

specific messages (such as 'restart host' on stdout) as last output of
a command cause the disconnect issue to not cause the task to fail, as
it's expected in that case.

Revision 89c65177
Added by Ivan Necas over 6 years ago

Merge pull request #20 from iNecas/handle-disconnect

Fixes #13491 - handle ssh disconnection

History

#1 Updated by The Foreman Bot over 6 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/20 added

#2 Updated by Ivan Necas over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by The Foreman Bot over 6 years ago

  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/155 added

#4 Updated by Marek Hulán over 6 years ago

  • Category set to Smart Proxy - SSH
  • Legacy Backlogs Release (now unused) set to 128

Also available in: Atom PDF