aws / aws/session-manager-plugin
Session Manager connection fail during reboot
- Dominant language
- Go
- Stars
- 320
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
I originally opened [this issue](https://github.com/hashicorp/packer-plugin-amazon/issues/289) on packer-plugin-amazon, but I've realised this might be a session issue.
# Overview of the Issue
I'm attempting to create an AMI in Amazon EBS that involves a reboot of the mac2.metal instance. I'm attempting to use `pause_before` after rebooting in shell in the step above. I'm also setting `expect_disconnect` to true
This unfortunately fails with `Connection to destination port failed, check SSM Agent logs`. when the instance reboots and the SSM agent is no longer connected.
Using this config works on our existing implementation using the `vsphere-clone` builder.
Is there a way to retry until the host is back up and for packer not to fail deployment ?
Contributor guide
Research direction
Start with the reported Amazon EBS reboot flow, including `pause_before` and `expect_disconnect`, and review the `Connection to destination port failed` condition alongside SSM Agent logs. Done means the session can wait for the host to return after reboot without failing the deployment; no source file or test is identified in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100