Skip to content

EBS source instance termination wait can dominate cleanup #682

@FocalChord

Description

@FocalChord

Overview

I think some Amazon EBS workflows could benefit from an explicit option to return after EC2 accepts source instance termination.

The case I measured used Packer to run work on a source instance and collect outputs before cleanup. The build did not need Packer to wait for the instance to reach the final terminated state.

Measurements

In a direct EC2 lifecycle comparison, c5.large reached terminated in about one minute after TerminateInstances was accepted. c5.metal remained shutting-down for more than 19 minutes before later reaching terminated.

In a minimal local Packer run on c5.metal, EC2 accepted source instance termination around one second after Packer requested it. Waiting for the final state was the long part.

Expected behavior

My theory is that the current default wait should stay unchanged. A separate opt in setting would let callers choose the faster completion point when their workflow does not need Packer to wait for final source instance deletion.

Scope

This is separate from skip_create_ami. The option should not require image creation to be disabled. It is about the cleanup completion point after EC2 accepts source instance termination.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions