Bug 725826

Summary: Force terminate-on-shutdown (instead of stop) for EC2 AMIs
Product: Red Hat Enterprise MRG Reporter: Luigi Toscano <ltoscano>
Component: condorAssignee: Timothy St. Clair <tstclair>
Status: CLOSED ERRATA QA Contact: Luigi Toscano <ltoscano>
Severity: high Docs Contact:
Priority: urgent    
Version: 2.0CC: iboverma, matt, rrati, tstclair
Target Milestone: 2.0.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: condor-7.6.3-0.3 Doc Type: Bug Fix
Doc Text:
C: Starting an EC2 instance which is stored in EBS C: On shutdown the instance will go into stop, not terminate and the job will continue to run, and user will still be billed. F: Initialize instance to terminate on shutdown. R: Job will complete and instance will be terminated.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-07 16:41:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 723887    

Description Luigi Toscano 2011-07-26 17:12:43 UTC
Description of problem:
S3-based images terminates when the AMI starts the shutdown. The default behavior for EBS-bases images is to stop when the AMI starts the shutdown. When this happen the jobs keeps running, and this breaks the assumption about the behavior of EC2 jobs.

Therefore EC2 jobs should always force terminate-on-shutdown for AMIs instead of stop.


Version-Release number of selected component (if applicable):
condor-7.6.3-0.2

Comment 1 Timothy St. Clair 2011-07-26 19:22:30 UTC
This must be from shutting down the instance internally, b/c the gahp only uses terminate calls.  

I'm guessing you are implying to set:
InstanceInitiatedShutdownBehavior = terminate

http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/index.html?ApiReference-query-RunInstances.html

Comment 2 Luigi Toscano 2011-07-27 09:34:10 UTC
Yes, "InstanceInitiatedShutdownBehavior = terminate" should force the expected behavior.

Comment 3 Timothy St. Clair 2011-07-27 20:32:51 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C: Starting an EC2 instance which is stored in EBS
C: On shutdown the instance will go into stop, not terminate and the job will continue to run, and user will still be billed.
F: Initialize instance to terminate on shutdown.
R: Job will complete and instance will be terminated.

Comment 4 Luigi Toscano 2011-07-29 13:42:39 UTC
The feature has been implemented. Shutdown started from the AMI instance leads to instance termination (not stop).

Verified on RHEL5.7/6.1, i386/x86_64 (submitter machines).

condor-classads-7.6.3-0.3
condor-7.6.3-0.3

Comment 5 errata-xmlrpc 2011-09-07 16:41:02 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-1249.html