You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Dies Koper (JIRA)" <ji...@apache.org> on 2012/05/16 10:00:19 UTC

[jira] [Created] (DTACLOUD-214) instance start/stop/destroy makes many calls to backend (depending on provider)

Dies Koper created DTACLOUD-214:
-----------------------------------

             Summary: instance start/stop/destroy makes many calls to backend (depending on provider)
                 Key: DTACLOUD-214
                 URL: https://issues.apache.org/jira/browse/DTACLOUD-214
             Project: DeltaCloud
          Issue Type: Improvement
          Components: Server
            Reporter: Dies Koper
            Assignee: David Lutterkort
            Priority: Minor


Before performing an action on an instance, DC retrieves the current instance state to confirm it is in a valid state to perform the requested action.

It does this by calling the instance() API. On some drivers, at least FGCP's, this operation makes a number of calls to the backend: one to get the instance attributes such as its name, one to get the state, one to get its assigned public IP address(es), one to get the initial password, etc.

While all it needs is the state.

If we extract and move the state retrieval code to a separate method we can override it with more efficient calls for providers that benefit from it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-214) instance start/stop/destroy makes many calls to backend (depending on provider)

Posted by "David Lutterkort (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276782#comment-13276782 ] 

David Lutterkort commented on DTACLOUD-214:
-------------------------------------------

I actually think we shouldn't check the current state of the instance at all - rather, we should perform the action and deal with any errors we get back.

Given that there's no guarantee that the state doesn't change between checking and changing it, we need to be prepared for those errors anyway.
                
> instance start/stop/destroy makes many calls to backend (depending on provider)
> -------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-214
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-214
>             Project: DeltaCloud
>          Issue Type: Improvement
>          Components: Server
>            Reporter: Dies Koper
>            Assignee: David Lutterkort
>            Priority: Minor
>         Attachments: 0001-extract-code-to-check-instance-state-to-separate-met.patch
>
>
> Before performing an action on an instance, DC retrieves the current instance state to confirm it is in a valid state to perform the requested action.
> It does this by calling the instance() API. On some drivers, at least FGCP's, this operation makes a number of calls to the backend: one to get the instance attributes such as its name, one to get the state, one to get its assigned public IP address(es), one to get the initial password, etc.
> While all it needs is the state.
> If we extract and move the state retrieval code to a separate method we can override it with more efficient calls for providers that benefit from it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DTACLOUD-214) instance start/stop/destroy makes many calls to backend (depending on provider)

Posted by "Dies Koper (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277308#comment-13277308 ] 

Dies Koper commented on DTACLOUD-214:
-------------------------------------

That solution seemed so obvious I thought it had been considered and dismissed already :)

That would work fine for the FGCP driver, it will receive an illegal state error from the cloud and can convert it to the HTTP 405 error (Method is not Allowed) as is generated now.
I can submit a patch to take out the current code and implement and test this for the FGCP driver, but won't be able to do so for the other providers.
                
> instance start/stop/destroy makes many calls to backend (depending on provider)
> -------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-214
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-214
>             Project: DeltaCloud
>          Issue Type: Improvement
>          Components: Server
>            Reporter: Dies Koper
>            Assignee: David Lutterkort
>            Priority: Minor
>         Attachments: 0001-extract-code-to-check-instance-state-to-separate-met.patch
>
>
> Before performing an action on an instance, DC retrieves the current instance state to confirm it is in a valid state to perform the requested action.
> It does this by calling the instance() API. On some drivers, at least FGCP's, this operation makes a number of calls to the backend: one to get the instance attributes such as its name, one to get the state, one to get its assigned public IP address(es), one to get the initial password, etc.
> While all it needs is the state.
> If we extract and move the state retrieval code to a separate method we can override it with more efficient calls for providers that benefit from it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DTACLOUD-214) instance start/stop/destroy makes many calls to backend (depending on provider)

Posted by "Dies Koper (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dies Koper updated DTACLOUD-214:
--------------------------------

    Attachment: 0001-extract-code-to-check-instance-state-to-separate-met.patch

move code that checks instance state to separate method in base_driver.rb so that it can be overridden by drivers. Override method in FGCP driver to only retrieve the state info from the backend.
                
> instance start/stop/destroy makes many calls to backend (depending on provider)
> -------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-214
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-214
>             Project: DeltaCloud
>          Issue Type: Improvement
>          Components: Server
>            Reporter: Dies Koper
>            Assignee: David Lutterkort
>            Priority: Minor
>         Attachments: 0001-extract-code-to-check-instance-state-to-separate-met.patch
>
>
> Before performing an action on an instance, DC retrieves the current instance state to confirm it is in a valid state to perform the requested action.
> It does this by calling the instance() API. On some drivers, at least FGCP's, this operation makes a number of calls to the backend: one to get the instance attributes such as its name, one to get the state, one to get its assigned public IP address(es), one to get the initial password, etc.
> While all it needs is the state.
> If we extract and move the state retrieval code to a separate method we can override it with more efficient calls for providers that benefit from it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DTACLOUD-214) instance start/stop/destroy makes many calls to backend (depending on provider)

Posted by "Dies Koper (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dies Koper updated DTACLOUD-214:
--------------------------------

    Attachment: 0001-leave-it-up-to-the-driver-to-return-405-error-Method.patch

patch to remove state check and let the driver take care of returning the correct error code. Includes change required for FGCP driver.
                
> instance start/stop/destroy makes many calls to backend (depending on provider)
> -------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-214
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-214
>             Project: DeltaCloud
>          Issue Type: Improvement
>          Components: Server
>            Reporter: Dies Koper
>            Assignee: David Lutterkort
>            Priority: Minor
>         Attachments: 0001-extract-code-to-check-instance-state-to-separate-met.patch, 0001-leave-it-up-to-the-driver-to-return-405-error-Method.patch
>
>
> Before performing an action on an instance, DC retrieves the current instance state to confirm it is in a valid state to perform the requested action.
> It does this by calling the instance() API. On some drivers, at least FGCP's, this operation makes a number of calls to the backend: one to get the instance attributes such as its name, one to get the state, one to get its assigned public IP address(es), one to get the initial password, etc.
> While all it needs is the state.
> If we extract and move the state retrieval code to a separate method we can override it with more efficient calls for providers that benefit from it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira