[ 
https://issues.apache.org/jira/browse/JCLOUDS-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13705009#comment-13705009
 ] 

ASF subversion and git services commented on JCLOUDS-171:
---------------------------------------------------------

Commit 6a5c6faac6b7ecec276e6c770663b3c3cbd11189 in branch refs/heads/1.6.x from 
[~nacx]
[ 
https://git-wip-us.apache.org/repos/asf?p=incubator-jclouds-labs.git;h=6a5c6fa ]

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.

                
> NPE in call to destroyNode for Abiquo
> -------------------------------------
>
>                 Key: JCLOUDS-171
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-171
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs
>    Affects Versions: 1.6.0
>         Environment: Abiquo "London" environment
>            Reporter: Alex Heneveld
>            Assignee: Ignasi Barrera
>              Labels: abiquo
>             Fix For: 1.7.0, 1.6.2
>
>         Attachments: JCLOUDS-171.patch
>
>
> caused by a race condition, as suggested in the stack trace below
> Caused by: java.lang.NullPointerException
> at org.jclouds.http.functions.ParseXMLWithJAXB.apply(ParseXMLWithJAXB.java:69)
> at org.jclouds.abiquo.domain.DomainWrapper.refresh(DomainWrapper.java:101)
> at 
> org.jclouds.abiquo.strategy.cloud.ListAttachedNics.execute(ListAttachedNics.java:67)
> at 
> org.jclouds.abiquo.domain.cloud.VirtualMachine.listAttachedNics(VirtualMachine.java:316)
> at 
> org.jclouds.abiquo.compute.functions.VirtualMachineToNodeMetadata.apply(VirtualMachineToNodeMetadata.java:120)
> at 
> org.jclouds.abiquo.compute.functions.VirtualMachineToNodeMetadata.apply(VirtualMachineToNodeMetadata.java:57)
> at 
> com.google.common.base.Functions$FunctionComposition.apply(Functions.java:210)
> at 
> org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.getNode(AdaptingComputeServiceStrategies.java:142)
> at 
> org.jclouds.compute.predicates.AtomicNodeTerminated.refreshOrNull(AtomicNodeTerminated.java:49)
> at 
> org.jclouds.compute.predicates.AtomicNodeTerminated.refreshOrNull(AtomicNodeTerminated.java:35)
> at 
> org.jclouds.compute.predicates.internal.TrueIfNullOrDeletedRefreshAndDoubleCheckOnFalse.apply(TrueIfNullOrDeletedRefreshAndDoubleCheckOnFalse.java:53)
> at 
> org.jclouds.compute.predicates.internal.TrueIfNullOrDeletedRefreshAndDoubleCheckOnFalse.apply(TrueIfNullOrDeletedRefreshAndDoubleCheckOnFalse.java:38)
> at org.jclouds.util.Predicates2$RetryablePredicate.apply(Predicates2.java:113)
> at 
> org.jclouds.compute.internal.BaseComputeService.doDestroyNode(BaseComputeService.java:306)
> at 
> org.jclouds.compute.internal.BaseComputeService.destroyNode(BaseComputeService.java:247)
> at brooklyn.location.jclouds.JcloudsLocation.release(JcloudsLocation.java:817)
> at brooklyn.location.jclouds.JcloudsLocation.release(JcloudsLocation.java:1)
> at 
> brooklyn.entity.basic.SoftwareProcessImpl.stopInLocation(SoftwareProcessImpl.java:505)
> at 
> brooklyn.entity.basic.SoftwareProcessImpl.stop(SoftwareProcessImpl.java:469)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to