On Fri, 2010-05-07 at 11:42 -0400, Chris Lalancette wrote:
> The *_instance methods are expected to return an instance
> object from the individual drivers.  The ec2 driver was
> failing to do this, leading to stacktraces in the server.
> Fix this up by fetching the instance after an action.

I'd argue that this is as much a bug in server.rb as in the driver.

These actions fall into the same category as create_instance. To be
defensive, the API should _only_ promise to return the URL to the
instance details on success; adding instance details is a nice addition,
but should be optional from the API POV.

The reason for this is that when we do, e.g. reboot_instance, there are
two calls to EC2 now: (1) call ec2.reboot_instances and (2)
ec2.describe_instances.

If the first call fails, we need to report an error through the API; if
the second call fails, we should return success in the API, though with
only a rudimentary instance object.

David


_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to