This repository has been archived by the owner on Jul 15, 2019. It is now read-only.
Terminateinstances
harlowja edited this page Apr 11, 2012
·
14 revisions
Type: GET/POST
Uri: http://$HOST:$PORT/$PATH/
Notes: Performed using euca-terminate-instances
using euca2ools_2.0.0~bzr464-0ubuntu2
on Ubuntu 11.10
Params:
AWSAccessKeyId=<VARIABLE>&Action=TerminateInstances&InstanceId.1=<VARIABLE>&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=<VARIABLE>&Version=2009-11-30
- Multiple instance ids can be passed in of the form
InstanceId.X
(where X >= 1)
Exact version requested: 2009-11-30
Restricted to: projectmanager, sysadmin
An XML response (with status code 200
) conforming to the previous XSD would be expected.
<?xml version="1.0" ?>
<TerminateInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-11-30/">
<requestId>req-9eee4d9a-281f-461f-b9fa-473bf91c09f6</requestId>
<instancesSet>
<item>
<instanceId>i-00000001</instanceId>
<shutdownState>
<code>0</code>
<name>error</name>
</shutdownState>
<previousState>
<code>0</code>
<name>error</name>
</previousState>
</item>
</instancesSet>
</TerminateInstancesResponse>
An error will be sent back in the following XML format (with a 400
status code):
<?xml version="1.0"?>
<Response>
<Errors>
<Error>
<Code>%s</Code>
<Message>%s</Message>
</Error>
</Errors>
<RequestID>%s</RequestID>
</Response>
- InstanceNotFound (is this also returned on db failures?)
- InvalidInstanceIDMalformed
- MigrationNotFoundByStatus (if currently being resized?)
- Unauthorized
- UnknownError
- (Others??)
- Does not comply to defined schema (ordering mainly)
- Version support is weak/non-existent; code copies input version parameter and echos it back
- Odd code call to
is_uuid_like
when getting an instance (huh?) - Instances that are set as terminating, may not actual be terminated immediately (more of a good to know)
- Instance ids passed in are validated only before they are terminated, thus partial terminations can occur (instead of validating the instances/ids then terminating them)
- LP Bug #979336
- Response names are not always correct (there is no
error
name) - The EC2 api states that "terminated instances will remain visible after termination (approximately one hour)", it doesn't seem like openstack does that (its nearly immediate)
- Error XML response creation does not do XML escaping, see LP bug #978439
- No validation on input of the given version
- No validation of the output
- Does not ensure it conforms to a given version
- No concept of separate renderers for all supported versions