[ 
https://issues.apache.org/jira/browse/DTACLOUD-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13483228#comment-13483228
 ] 

Marios Andreou commented on DTACLOUD-351:
-----------------------------------------

Hi Dies - I understand the problem with the async 'stop first then destroy' for 
firewalls but I have some comments/questions:

1. Can you clarify a little about why firewalls should be removed altogether 
from the instances list? (just to help me understand)

2. Why can you not just use 'stop_instance' call to stop the firewall first - 
i.e. as before? Sure, this firewall will not show up in the list of 
'instances', but it's still 'there' - and looking at your 'stop_instance' code, 
the provision is still there to stop the firewall. This would have to be 
documented under 'driver specific notes' for example.

3. Regarding the response code - I don't 5XX code is appropriate here as they 
are for server errors. The best fit I think is something like '202 Accepted' 
which exactly means  "request has been accepted for processing, but the 
processing has not been completed. The request might or might not eventually be 
acted upon, as it might be disallowed when processing actually takes place.". 
But in any case - we cannot return a different status code for a given 
operation. As in, the current 'destroy_firewall' op returns a '202' - and this 
happens at a Deltacloud server level rather than at a driver level (i.e. we 
don't set status code in a driver as the response must be uniform across 
drivers). Depending on whether my suggestion in 2. above is acceptable we will 
need to discuss/explore solutions here further.

4. Just a note - regarding your 'on exceptions' block. You can 'chain' 
exceptions together, like:

1326     on /ALREADY_STARTED/ do$
1327       status 405 # Method Not Allowed$
1328     end$
1329 $
1330     # trying to start a running vserver, etc.$
1331     on /ILLEGAL_STATE/ do$
1332       status 405 # Method Not Allowed$
1333     end$

can become:

on /(ALREADY_STARTED|ILLEGAL_STATE)/ do
  status 405
end
                
> fgcp: serverType for FWs changed to 'firewall' which is not in server type 
> list
> -------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-351
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-351
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: fgcp
>            Reporter: Dies Koper
>            Assignee: Marios Andreou
>         Attachments: 0001-fgcp-take-fw-out-of-instance-list.patch
>
>
> fgcp API changed: it now returns 'firewall' for FWs, which is not listed in 
> server type list.
> This causes issues for cimi /machines API which cross-references with 
> hardware_profiles output.
> Better to remove FW instances from instance list altogether.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to