You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Tomaz Muraus (JIRA)" <ji...@apache.org> on 2012/05/29 06:33:24 UTC
[dev] [jira] [Closed] (LIBCLOUD-176) Compute, base.py:
_wait_until_running fails for Rackspace
[ https://issues.apache.org/jira/browse/LIBCLOUD-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomaz Muraus closed LIBCLOUD-176.
---------------------------------
> Compute, base.py: _wait_until_running fails for Rackspace
> ---------------------------------------------------------
>
> Key: LIBCLOUD-176
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-176
> Project: Libcloud
> Issue Type: Bug
> Affects Versions: 0.8.0
> Reporter: Jouke Waleson
> Labels: beginners, rackspace
> Fix For: 0.10.1
>
>
> The Rackspace driver's list_nodes method will not include a brand new node right away. Therefore, the following code will fail when being called after deploy_node.
> while time.time() < end:
> nodes = self.list_nodes()
> nodes = list([n for n in nodes if n.uuid == node.uuid])
> if len(nodes) == 0:
> raise LibcloudError(value=('Booted node[%s] ' % node
> + 'is missing from list_nodes.'),
> driver=self)
> if len(nodes) > 1:
> raise LibcloudError(value=('Booted single node[%s], ' % node
> + 'but multiple nodes have same UUID'),
> driver=self)
> node = nodes[0]
> if (node.public_ips and node.state == NodeState.RUNNING):
> return node
> else:
> time.sleep(wait_period)
> continue
> I fixed this by rewriting it like this:
> while time.time() < end:
> nodes = self.list_nodes()
> nodes = list([n for n in nodes if n.uuid == node.uuid])
> if len(nodes) > 1:
> raise LibcloudError(value=('Booted single node[%s], ' % node
> + 'but multiple nodes have same UUID'),
> driver=self)
> if (len(nodes) == 1 and nodes[0].public_ips and nodes[0].state == NodeState.RUNNING):
> return nodes[0]
> else:
> time.sleep(wait_period)
> continue
--
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