mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 17:33:03 -05:00
CancelSteps took no StepCancellationOption: a cancelled RUNNING step's container was killed at once, which is TERMINATE_PROCESS. The Management Guide's "Cancel steps" makes SEND_INTERRUPT the default: "EMR sends a SIGTERM signal to the step", which may catch it "to terminate descendant step processes or wait for them to complete"; with TERMINATE_PROCESS "EMR sends a SIGKILL signal to the step and all its descendant processes which terminates them immediately". With SEND_INTERRUPT the step's container now gets SIGTERM and the step stays CANCEL_PENDING until its command ends on its own, CANCELLED then, without its ActionOnFailure. A step's container runs under an init process, as Docker's --init runs one, so that the signal reaches its command: a container's first process ignores SIGTERM unless it handles it. A step whose container is not running yet has nothing to interrupt, and is stopped as before. TERMINATE_PROCESS kills it at once, as every cancel did, with SIGKILL alone, as Docker's own stop would send SIGTERM first and the init would pass it on; it also kills a step a SEND_INTERRUPT cancel left running, and a cluster's end kills such a step too. An option that is neither gets the framework's enum message. A CancelSteps request takes at most 100 steps from release 7.14.0, and 256 before it, as "With Amazon EMR releases 7.14.0 and later, the maximum number of steps you can cancel per request is 100".