Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/88#discussion_r57704549
  
    --- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsSshMachineLocation.java
 ---
    @@ -162,8 +162,12 @@ public void init() {
         @Override
         public void rebind() {
             super.rebind();
    -        ComputeServiceContext context = 
jcloudsParent.getComputeService().getContext();
    -        runScriptFactory = 
context.utils().injector().getInstance(RunScriptOnNode.Factory.class);
    +        
    +        if (jcloudsParent != null) {
    +            // can be null on rebind, if location has been "orphaned" 
somehow
    +            ComputeServiceContext context = 
jcloudsParent.getComputeService().getContext();
    +            runScriptFactory = 
context.utils().injector().getInstance(RunScriptOnNode.Factory.class);
    +        }
    --- End diff --
    
    Isn't the rebind failing a good thing in this case - it shows that 
something is wrong and there will be runtime errors if not addressed.
    Can we address the problem in another way? For example:
      * why are parent locations not serialized - is this a bug?
      * serialize parent locations even if not managd



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to