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

ASF GitHub Bot commented on BROOKLYN-259:
-----------------------------------------

Github user johnmccabe commented on the pull request:

    https://github.com/apache/brooklyn-server/pull/132
  
    Hi @aledsage, sorry for the delay getting back to you, the env I had 
originally observed this on is still inaccessible so I had to recreate, 
unfortunately, still seeing an NPE when attempting to deploy to the following 
location (`userCredentials.getUser()` again):
    ```
    
brooklyn.location.named.my-jclouds-byon=jcloudsByon:(provider="cloudstack",endpoint="https://my-cloudstack-endpoint.domain.com/client/api",region="my-region-id",networkName="my-network-id",user="root",password="supersecretrootpassword",hosts="my-existing-host-id";)
    brooklyn.location.named.my-jclouds-byon.identity=MY_API_KEY
    brooklyn.location.named.my-jclouds-byon.credential=MY_SECRET_KEY
    ```
    
    ```
    2016-06-01 11:30:04,141 WARN  o.a.b.c.m.i.LocalLocationManager 
[brooklyn-execmanager-qQtAY4JU-1]: Failed to create location using spec 
LocationSpec{type=class 
org.apache.brooklyn.location.byon.FixedListMachineProvisioningLocation}@33a9098e
 (rethrowing)
    java.lang.NullPointerException: null
            at 
org.apache.brooklyn.location.jclouds.JcloudsLocation.createJcloudsSshMachineLocation(JcloudsLocation.java:2319)
 ~[brooklyn-locations-jclouds-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
org.apache.brooklyn.location.jclouds.JcloudsLocation.registerJcloudsSshMachineLocation(JcloudsLocation.java:2255)
 ~[brooklyn-locations-jclouds-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
org.apache.brooklyn.location.jclouds.JcloudsLocation.registerMachineLocation(JcloudsLocation.java:2106)
 ~[brooklyn-locations-jclouds-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
org.apache.brooklyn.location.jclouds.JcloudsLocation.registerMachine(JcloudsLocation.java:2097)
 ~[brooklyn-locations-jclouds-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
org.apache.brooklyn.location.jclouds.JcloudsByonLocationResolver$1.get(JcloudsByonLocationResolver.java:156)
 ~[brooklyn-locations-jclouds-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
org.apache.brooklyn.location.jclouds.JcloudsByonLocationResolver$1.get(JcloudsByonLocationResolver.java:147)
 ~[brooklyn-locations-jclouds-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
org.apache.brooklyn.location.byon.FixedListMachineProvisioningLocation.init(FixedListMachineProvisioningLocation.java:173)
 ~[brooklyn-core-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
org.apache.brooklyn.core.objs.proxy.InternalLocationFactory.createLocation(InternalLocationFactory.java:137)
 ~[brooklyn-core-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
org.apache.brooklyn.core.mgmt.internal.LocalLocationManager.createLocation(LocalLocationManager.java:94)
 ~[brooklyn-core-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
org.apache.brooklyn.core.objs.proxy.InternalEntityFactory$1.run(InternalEntityFactory.java:331)
 [brooklyn-core-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
[na:1.7.0_79]
            at 
org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)
 [brooklyn-core-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
            at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
[na:1.7.0_79]
            at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
[na:1.7.0_79]
            at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
[na:1.7.0_79]
            at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
    ```
    I'm going to rebuild to sanity check my install (I've built clocker against 
the #132 brooklyn-server branch).


> jcloudsByon location spec leaks location instances
> --------------------------------------------------
>
>                 Key: BROOKLYN-259
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-259
>             Project: Brooklyn
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Aled Sage
>             Fix For: 0.10.0
>
>
> When declaring in brooklyn.properties a location spec such as 
> {noformat}
> jcloudsByon(provider="aws-ec2",region="us-east-1",user="brooklyn",password="pa55w0rd",hosts="i-12345678")
> {noformat}
> It caused new locations to be created and persisted every few seconds, but 
> for those locations to be never deleted.
> ---
> This was caused by changes made in 0.9.0 to {{LocationResolver}} 
> implementations, so that it creates a {{LocationSpec}} rather than 
> instantiating a location directly. Unfortunately, 
> {{JcloudsByonLocationResolver}} had not been updated. The REST api would poll 
> this regularly to find out about the types of location, and on every poll it 
> would create new locations.
> This is similar to the problem encountered for localhost, fixed in time for 
> 0.9.0 in https://github.com/apache/brooklyn-server/pull/97.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to