jclouds/jclouds-labs — pull request #11 by nacx (2013-07-08 08:39:00+00:00)
Title: JCLOUDS-171: Fixed NPE when destroying nodes in Abiquo

There was a race condition when destroying a node in Abiquo using the ComputeService: jclouds performed the active wait until the node was in state TERMINATED, and used the transformation functions to convert an Abiquo VirtualMachine to a NodeMetadata. If the node was effectively deleted during this transformation, a NPE was raised. This is because there are a couple of API calls that are executed in that transformation to retrieve all information required to build the NodeMetadata.

To prevent this, the AbiquoComputeServiceAdapter will block until the node has been actually deleted instead of delegating that to jclouds. This way there is no need to run the transformation functions that had the race condition.