Skip to content

handle case when remote ssh server disconnects#4034

Merged
mwhooker merged 1 commit into
masterfrom
sshdisconnect
Oct 21, 2016
Merged

handle case when remote ssh server disconnects#4034
mwhooker merged 1 commit into
masterfrom
sshdisconnect

Conversation

@mwhooker
Copy link
Copy Markdown
Contributor

needs a little more work but here's something that works in a way I like

Also adds cool new config syntax that lets us default expect_disconnect to true.

Closes #4011
Replaces #4010
Fixes #4006

@mwhooker mwhooker changed the title [WIP] handle case when remote ssh server disconnects handle case when remote ssh server disconnects Oct 20, 2016
// Whether to clean scripts up
SkipClean bool `mapstructure:"skip_clean"`

ExpectDisconnect *bool `mapstructure:"expect_disconnect"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

provisioner/shell: Adds option to fail if the remote server disconnects
us.
@trodemaster
Copy link
Copy Markdown
Contributor

Hey Guys, I think this is still breaking builds. My builds that use ssh communicator and shutdown are failing with "Build 'vmware-iso' errored: Shutdown command has non-zero exit status." this is with Packer v0.11.1.dev (da2262a). Seems like shutdown command should not barf on any error code or disconnect.

@mwhooker mwhooker mentioned this pull request Oct 22, 2016
@mwhooker
Copy link
Copy Markdown
Contributor Author

@trodemaster thanks for the report. I threw up a PR (#4041) which I think might fix this. I wasn't able to reproduce this right away. Would you mind testing this?

@rickard-von-essen
Copy link
Copy Markdown
Contributor

Great work!

@trodemaster
Copy link
Copy Markdown
Contributor

I have confirmed that this fixes the shutdown issue I was seeing. Thanks
for getting it fixed up!!

Cheers,
Blake

On Sat, Oct 22, 2016 at 4:11 AM, Rickard von Essen <notifications@github.com

wrote:

Great work!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#4034 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFZ21FvMCKhcIpDIVKuYTAFIVEewoTHzks5q2e93gaJpZM4Kcpa-
.

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to fail shell provisioner if remote disconnects Problem executing reboot in shell provisioner

4 participants