incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: Various fixes in REST (status codes, etc)
Date Fri, 10 Dec 2010 11:20:08 GMT
after chatting with Michal on irc, i will ack-ish this patch :)

Basically it needs to be reworked, comments below:

On 07/12/10 16:05, mfojtik@redhat.com wrote:
> Hi,
>
> This patch includes a lot of REST-specific fixes to be more 'RESTish' ;-)
>
> Some notes:
>
> * Start action on stopped instance (EC2 especially)
>    This will lead to immediate Internal Server Error right now when this
>    instance is not EBS.
>    So rather than returning ISE, return 304 (Not Modified) and redirect
>    back to that instance (eg. instance status was not modified by this call)

this is a good idea, but might be invalidated by our re-introduction of 
the 'terminated' state for ec2 (and any other drivers that need it tbd). 
Once that happens then you won't have the option of doing a 'start' when 
you stop an s3 backed ec2 instance.

>
> * DELETE calls
>    Now we redirecting client to deleted resource, which from my point of
>    view has no sense ;-)
>    So instead of pointing client to deleted resource, reply with '410'
>    status code (Gone), and tell client that this resource was deleted
>    and it's 'marked' as deleted.

I agree with the principle of returning a 410 for deleted resources and 
NOT redirecting to that resource. However, this patch doesn't fix a 
'redirect to deleted resource' problem  - i mean in this patch the 
delete actions are referring to blobs and when we delete blobs, we 
redirect to the *bucket* not the blob. Also, we can't generalise the 
whole 410 thing - if the client is xml/json then a 410 response is fine, 
but if its a html client then we should redirect to the resource index 
(e.g. delete a blob ==> redirect to bucket, delete an instance ==> 
redirect to instances, etc).

marios

Mime
View raw message