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

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

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

    https://github.com/apache/brooklyn-server/pull/530#discussion_r97329773
  
    --- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
    @@ -1065,6 +1066,13 @@ protected MachineLocation obtainOnce(ConfigBag 
setup) throws NoMachinesAvailable
                     LOG.warn("Problem generating log message summarising 
completion of jclouds machine provisioning "+machineLocation+" by "+this, e);
                 }
     
    +            if (customizers.size() > 0) {
    +                machineLocation.config().set(JCLOUDS_LOCATION_CUSTOMIZERS, 
customizers);
    +            }
    +            if (machineCustomizers.size() > 0) {
    +                machineLocation.config().set(MACHINE_LOCATION_CUSTOMIZERS, 
machineCustomizers);
    +            }
    --- End diff --
    
    Can you instead add the config for `JCLOUDS_LOCATION_CUSTOMIZERS` at 
[construction 
time](https://github.com/apache/brooklyn-server/blob/master/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java#L2056-L2099)
 so migrated settings are all at one place.



> JcloudsLocation is not releasing its customizers
> ------------------------------------------------
>
>                 Key: BROOKLYN-427
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-427
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Geoff Macartney
>            Priority: Minor
>
> preRelease and postRelease of JcloudsLocationCustomizers are not being 
> called as expected during the release of a Jclouds machine location.
> The problem is that the "setup" used in JcloudsLocation.obtainOnce includes a 
> copy of the flags passed from 
> MachineLifecycleEffectorTasks#stopAnyProvisionedMachines,
> which includes the customizers. However, the "setup" used in the "release"
> method of JcloudsLocation is taken from the JcloudsLocation itself, which
> is the provisioning (i.e. parent) location, which doesn't have those 
> customizers in it. 
> It would actually make more sense to get the location customizers from
> the machine location, as a given parent could have mutiple machines
> with different customizers. 



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

Reply via email to