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 <[email protected]> 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 <[email protected]> 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


Reply via email to