Packer Version: 1.4.3
Hey All,
I have a packer pipeline running in Gitlab CI that builds an AMI with the amazon-ebs builder. In my packer pipeline everything seems to finish up and it stalls out on terminating source aws instance. I've turned debug logging on for troubleshooting but it didn't provide much information. Below is a redacted log of the last few steps. I'm happy to provide any other information that might be helpful. Would love a second set of eyes on this.
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [INFO] RPC endpoint: Communicator ended with: 0
2020/04/08 19:23:56 [INFO] 6037503 bytes written for 'stdout'
2020/04/08 19:23:56 [INFO] 0 bytes written for 'stderr'
2020/04/08 19:23:56 [INFO] RPC client: Communicator ended with: 0
2020/04/08 19:23:56 [INFO] RPC endpoint: Communicator ended with: 0
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [INFO] 6037503 bytes written for 'stdout'
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [INFO] 0 bytes written for 'stderr'
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [INFO] RPC client: Communicator ended with: 0
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [DEBUG] Opening new ssh session
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [DEBUG] starting remote command: rm -f /tmp/script_452.sh
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [INFO] RPC endpoint: Communicator ended with: 0
2020/04/08 19:23:56 [INFO] RPC client: Communicator ended with: 0
2020/04/08 19:23:56 [INFO] RPC endpoint: Communicator ended with: 0
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [INFO] RPC client: Communicator ended with: 0
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [DEBUG] Opening new ssh session
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [DEBUG] starting remote command: rm -f
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [INFO] RPC endpoint: Communicator ended with: 0
2020/04/08 19:23:56 [INFO] RPC client: Communicator ended with: 0
2020/04/08 19:23:56 [INFO] RPC endpoint: Communicator ended with: 0
2020/04/08 19:23:56 packer: 2020/04/08 19:23:56 [INFO] RPC client: Communicator ended with: 0
2020/04/08 19:23:56 [INFO] (telemetry) ending shell
==> amazon-ebs: Stopping the source instance...
amazon-ebs: Stopping instance
==> amazon-ebs: Waiting for the instance to stop...
==> amazon-ebs: Enabling Enhanced Networking (ENA)...
==> amazon-ebs: Creating AMI <REDACTED> from instance <REDACTED>
amazon-ebs: AMI: ami-<REDACTED>
==> amazon-ebs: Waiting for AMI to become ready...
==> amazon-ebs: Copying/Encrypting AMI (ami-<REDACTED>) to other regions...
amazon-ebs: Copying to: us-east-1
amazon-ebs: Copying to: us-west-2
amazon-ebs: Waiting for all copies to complete...
==> amazon-ebs: Modifying attributes on AMI (ami-<REDACTED>)...
amazon-ebs: Modifying: description
amazon-ebs: Modifying: users
==> amazon-ebs: Modifying attributes on AMI (ami-<REDACTED>)...
amazon-ebs: Modifying: description
amazon-ebs: Modifying: users
==> amazon-ebs: Modifying attributes on snapshot (snap-<REDACTED>)...
==> amazon-ebs: Modifying attributes on snapshot (snap-<REDACTED>)...
==> amazon-ebs: Modifying attributes on snapshot (snap-<REDACTED>)...
==> amazon-ebs: Modifying attributes on snapshot (snap-<REDACTED>)...
==> amazon-ebs: Modifying attributes on snapshot (snap-<REDACTED>)...
==> amazon-ebs: Modifying attributes on snapshot (snap-<REDACTED>)...
==> amazon-ebs: Adding tags to AMI (ami-<REDACTED>)...
==> amazon-ebs: Tagging snapshot: snap-<REDACTED>
==> amazon-ebs: Tagging snapshot: snap-<REDACTED>
==> amazon-ebs: Tagging snapshot: snap-<REDACTED>
==> amazon-ebs: Creating AMI tags
amazon-ebs: Adding tag: "Name": "<REDACTED>"
amazon-ebs: Adding tag: "OS": "<REDACTED>"
==> amazon-ebs: Creating snapshot tags
==> amazon-ebs: Adding tags to AMI (ami-<REDACTED>)...
==> amazon-ebs: Tagging snapshot: snap-<REDACTED>
==> amazon-ebs: Tagging snapshot: snap-<REDACTED>
==> amazon-ebs: Tagging snapshot: snap-<REDACTED>
==> amazon-ebs: Creating AMI tags
amazon-ebs: Adding tag: "Name": "<REDACTED>"
amazon-ebs: Adding tag: "OS": "<REDACTED>"
==> amazon-ebs: Creating snapshot tags
==> amazon-ebs: Deregistering the AMI and deleting unencrypted temporary AMIs and snapshots
==> amazon-ebs: Deregistered AMI id: ami-<REDACTED>
==> amazon-ebs: Deleted snapshot: snap-<REDACTED>
==> amazon-ebs: Deleted snapshot: snap-<REDACTED>
==> amazon-ebs: Deleted snapshot: snap-<REDACTED>
==> amazon-ebs: Terminating the source AWS instance...