You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by Steven Baker <st...@stevenrbaker.com> on 2009/12/09 07:10:54 UTC
Problem with listing and deleting nodes.
I was told on twitter to email here about my problem.
I've attached the script I'm using and the output from it. The two problems I'm having: list_nodes() is not reliable. Sometimes it lists my nodes, but often not. destroy_node() raises an exception every time.
Any insight would be appreciated.
Thanks,
-Steven
[]
<Node: uuid=8ac9bcd413f4d517c4e587f8252a79e87cc08d75, name=foobar, state=BUILD, public_ip=['204.232.210.238'], provider=Rackspace ...>
[]
Traceback (most recent call last):
File "test.py", line 36, in <module>
print driver.destroy_node(node)
File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/libcloud/drivers/rackspace.py", line 195, in destroy_node
resp = self.connection.request(uri, method='DELETE')
File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/libcloud/drivers/rackspace.py", line 109, in request
method=method, headers=headers)
File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/libcloud/base.py", line 233, in request
response = self.responseCls(self.connection.getresponse())
File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/libcloud/base.py", line 112, in __init__
raise Exception(self.parse_error())
Exception
Re: Problem with listing and deleting nodes.
Posted by Soren Hansen <so...@ubuntu.com>.
On Tue, Dec 08, 2009 at 10:10:54PM -0800, Steven Baker wrote:
> I've attached the script I'm using and the output from it. The two
> problems I'm having: list_nodes() is not reliable. Sometimes it lists
> my nodes, but often not.
Responses from Rackspace are cached (server-side). After a while, do
they show up?
--
Soren Hansen |
Lead virtualisation engineer | Ubuntu Server Team
Canonical Ltd. | http://www.ubuntu.com/
Re: Problem with listing and deleting nodes.
Posted by Tom Davis <to...@dislocatedday.com>.
Yes, that is an exceptionally worthless exception. Not only is using
the base Exception a bad idea (makes things harder to catch
intelligently) but it seems to indicate parse_error() is buggy because
no error was provided...
At the very least a refactor to remove Exception should take place. If
Rackspace doesn't elegently handle someone trying to delete a building
node so be it, but if there is an error returned it shouldn't fail to
be shown to the user.
If nobody beats me to it (do we have a RS maintainer?) I will look
into these issues.
On Dec 9, 2009, at 2:52 AM, Jeremy Orem <je...@gmail.com> wrote:
> The error and list_node behavior you are seeing seem happen when a
> node is building. I don't think there is a way to destroy a node while
> it is building, but we should at least make the error more obvious.
>
> -Jeremy
>
> On Tue, Dec 8, 2009 at 10:10 PM, Steven Baker
> <st...@stevenrbaker.com> wrote:
>> I was told on twitter to email here about my problem.
>>
>> I've attached the script I'm using and the output from it. The two
>> problems I'm having: list_nodes() is not reliable. Sometimes it
>> lists my nodes, but often not. destroy_node() raises an exception
>> every time.
>>
>> Any insight would be appreciated.
>>
>> Thanks,
>> -Steven
>>
>>
>> []
>> <Node: uuid=8ac9bcd413f4d517c4e587f8252a79e87cc08d75, name=foobar,
>> state=BUILD, public_ip=['204.232.210.238'], provider=Rackspace ...>
>> []
>> Traceback (most recent call last):
>> File "test.py", line 36, in <module>
>> print driver.destroy_node(node)
>> File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/
>> libcloud/drivers/rackspace.py", line 195, in destroy_node
>> resp = self.connection.request(uri, method='DELETE')
>> File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/
>> libcloud/drivers/rackspace.py", line 109, in request
>> method=method, headers=headers)
>> File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/
>> libcloud/base.py", line 233, in request
>> response = self.responseCls(self.connection.getresponse())
>> File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/
>> libcloud/base.py", line 112, in __init__
>> raise Exception(self.parse_error())
>> Exception
>>
>>
Re: Problem with listing and deleting nodes.
Posted by Jeremy Orem <je...@gmail.com>.
The error and list_node behavior you are seeing seem happen when a
node is building. I don't think there is a way to destroy a node while
it is building, but we should at least make the error more obvious.
-Jeremy
On Tue, Dec 8, 2009 at 10:10 PM, Steven Baker <st...@stevenrbaker.com> wrote:
> I was told on twitter to email here about my problem.
>
> I've attached the script I'm using and the output from it. The two problems I'm having: list_nodes() is not reliable. Sometimes it lists my nodes, but often not. destroy_node() raises an exception every time.
>
> Any insight would be appreciated.
>
> Thanks,
> -Steven
>
>
> []
> <Node: uuid=8ac9bcd413f4d517c4e587f8252a79e87cc08d75, name=foobar, state=BUILD, public_ip=['204.232.210.238'], provider=Rackspace ...>
> []
> Traceback (most recent call last):
> File "test.py", line 36, in <module>
> print driver.destroy_node(node)
> File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/libcloud/drivers/rackspace.py", line 195, in destroy_node
> resp = self.connection.request(uri, method='DELETE')
> File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/libcloud/drivers/rackspace.py", line 109, in request
> method=method, headers=headers)
> File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/libcloud/base.py", line 233, in request
> response = self.responseCls(self.connection.getresponse())
> File "/Users/srbaker/Development/goldstar-tools/vendor/libcloud/libcloud/base.py", line 112, in __init__
> raise Exception(self.parse_error())
> Exception
>
>