run_instances empty list result may be invalid

Bug #495546 reported by Duncan McGreggor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
txAWS
New
Undecided
Unassigned

Bug Description

Thomas and I had a long discussion today about the behaviour of txaws.ec2.client.EC2Client.run_instances. It seems that Amazon indicates the possibility for a non-error, empty result in their 2008-12-01 EC2 docs. At the top of the page for the "RunInstances" query documentation:

  "If Amazon EC2 cannot launch the minimum number AMIs you request, no instances launch."

The docs don't say whether an error is returned, and we could find no specific error for Amazon not being able to launch a minimum requested instance count.

If the behaviour of EC2 can be confirmed in practice to return an error in the event of not being able to start up the minimum requested number of instances, the txAWS EC2 client's run_instances method needs to be updated to account for that.

If the behaviour of EC2 can be confirmed to never return an non-error result with no instances in it, then the txAWS EC2 client's run_instances method needs to be changed.

Revision history for this message
Thomas Herve (therve) wrote :

I don't think there is anything to change in txaws? If an error is returned, it's already turned into an exception.

My point is, today txaws doesn't return an empty list in run_instances.

Revision history for this message
Duncan McGreggor (oubiwann) wrote : Re: [Bug 495546] Re: run_instances empty list result may be invalid

Thomas Herve wrote:
> I don't think there is anything to change in txaws? If an error is
> returned, it's already turned into an exception.
>
> My point is, today txaws doesn't return an empty list in run_instances.

Hrm. Maybe I'm missing what you're saying, but I think it actually does.
Take a look at _parse_instances_set (called by _parse_run_instances,
which is called by run_instances). As such, I believe that if no
instances are run by AWS EC2 when run_instances is called, the instances
returned to _parse_run_instances will be an empty list, and that will be
what it returns.

This seems contrary to what you are saying... can you clarify?

Revision history for this message
Thomas Herve (therve) wrote :

I'm saying that AWS doesn't return an empty list, but returns an error.

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Thomas Herve wrote:
> I'm saying that AWS doesn't return an empty list, but returns an error.

But only if an error is generated by AWS. We don't know if Amazon
generates errors in all cases where no instances are run (after a
request to run them). If Amazon doesn't return an error, then txAWS
will, in fact, return an empty list.

Revision history for this message
Thomas Herve (therve) wrote :

Yes, but in any case there is nothing to do in txaws.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.