[
https://issues.apache.org/jira/browse/LIBCLOUD-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032327#comment-13032327
]
Tomaz Muraus commented on LIBCLOUD-85:
--------------------------------------
Hey, thank you for your patch.
We have already talked about this on IRC and imo we need better mechanism for
retrying calls which fail due to I/O or API error.
In this case it is also possible the that node is not destroyed because
destroy_node() call fails.
I would probably be OK with a some kind of "retry" context manager which would
retry a function call if it fails due to I/O API error. It should also be easy
to adjust the maximum number of retries and delay between them.
> Exception handling in cascaded function call in ec2 create_node is needed.
> --------------------------------------------------------------------------
>
> Key: LIBCLOUD-85
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-85
> Project: Libcloud
> Issue Type: Bug
> Components: Compute
> Affects Versions: 0.4.1, 0.5.0
> Reporter: Philip Schwartz
>
> In create_node for ec2, a call to ex_create_tags.
> for node in nodes:
> self.ex_create_tags(node=node, tags={'Name': kwargs['name']})
> This should catch an exception and clean up the failed create if an exception
> is thrown. Currently when the ex_create_tags fails due to a node not being
> registered correctly yet (but created), an exception of node id does not
> exist is thrown. This cascades as a failure of the full call to any code
> calling create_node when in fact the node was created.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira