brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-386) NPE on rebind calling CreateUserPolicy.addUser
Date Tue, 15 Nov 2016 10:25:59 GMT

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

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

GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-server/pull/438

    Fix BROOKLYN-386: avoid locationAdded events on rebind

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aledsage/brooklyn-server fix/BROOKLYN-386

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/438.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #438
    
----
commit 83d8626d2fc19c4446ec73a025c30ec72eb4aea1
Author: Aled Sage <aled.sage@gmail.com>
Date:   2016-11-15T07:43:38Z

    BROOKLYN-386: Avoid NPE in JcloudsSshMachineLocation.getOptionalNode

commit b42210ee2556bc2a97a53387f6ffc4f4ee01efe6
Author: Aled Sage <aled.sage@gmail.com>
Date:   2016-11-15T09:57:31Z

    BROOKLYN-386: avoid locationAdded events on rebind

commit 67adc68623becc5c7f0a7ed62b9ade1b233e96c7
Author: Aled Sage <aled.sage@gmail.com>
Date:   2016-11-15T09:57:56Z

    BROOKLYN-386: adds CreateUserPolicyRebindTest

----


> NPE on rebind calling CreateUserPolicy.addUser
> ----------------------------------------------
>
>                 Key: BROOKLYN-386
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-386
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>
> I found this NullPointerException in the log:
> {noformat}
> 2016-09-07 13:50:40,633 INFO  o.a.b.c.m.r.RebindIteration [brooklyn-execmanager-EVQzoN78-0]:
Rebind complete (MASTER) in 41.0s: 6 apps, 16 entities, 56 locations, 2 policies, 88 enrichers,
0 feeds, 162 catalog items
> 2016-09-07 13:50:40,633 DEBUG o.a.b.c.m.r.RebindIteration [brooklyn-execmanager-EVQzoN78-0]:
RebindManager complete; apps: [fxky5xbx0z, vt864wmzpn, u3ohrxr21o, X0UTBSWZ, sJslLEBo, eb95zYiG]
> 2016-09-07 13:50:40,634 INFO  o.a.b.p.j.os.CreateUserPolicy [brooklyn-execmanager-EVQzoN78-0]:
Adding auto-generated user myname @ 1.2.3.4:11071
> 2016-09-07 13:50:40,667 DEBUG o.a.b.c.m.r.RebindManagerImpl [main]: Starting persistence
(org.apache.brooklyn.core.mgmt.rebind.RebindManagerImpl@19d095d5[mgmt=EVQzoN78]), mgmt EVQzoN78
> 2016-09-07 13:50:40,668 DEBUG o.a.b.l.j.JcloudsSshMachineLocation [brooklyn-execmanager-EVQzoN78-0]:
Problem getting node-metadata for SshMachineLocation[MyVcloudDirector(Test):amp@1.1.1.1/1.1.1.1:11071(id=N1UFSoVb)],
node id urn:vcloud:vm:be3270fd-698f-4be3-b8
> 55-d379505ac95a (continuing)
> java.lang.NullPointerException: null
>         at org.apache.brooklyn.location.jclouds.JcloudsSshMachineLocation.getOptionalNode(JcloudsSshMachineLocation.java:225)
[brooklyn-locations-jclouds-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.location.jclouds.JcloudsSshMachineLocation.getOptionalOperatingSystem(JcloudsSshMachineLocation.java:519)
[brooklyn-locations-jclouds-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.location.jclouds.JcloudsSshMachineLocation.inferMachineDetails(JcloudsSshMachineLocation.java:543)
[brooklyn-locations-jclouds-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.location.ssh.SshMachineLocation.getMachineDetails(SshMachineLocation.java:1058)
[brooklyn-core-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.policy.jclouds.os.CreateUserPolicy.addUser(CreateUserPolicy.java:145)
[brooklyn-locations-jclouds-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.policy.jclouds.os.CreateUserPolicy$1.run(CreateUserPolicy.java:114)
[brooklyn-locations-jclouds-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.util.concurrent.CallableFromRunnable.call(CallableFromRunnable.java:43)
[brooklyn-utils-common-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)
[brooklyn-core-0.10.0-20160907.0931.jar:0.10.0-20160907.0931]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_95]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_95]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_95]
>         at java.lang.Thread.run(Thread.java:745) [na:1.7.0_95]
> {noformat}
> It shouldn't try to create the user again on rebind. And we should check to avoid the
NPE as well.
> But this is benign, given that we don't want it to be executing the create-user code
again anyway.



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

Mime
View raw message