GitHub user aledsage opened a pull request:
https://github.com/apache/brooklyn-server/pull/710
Fix JcloudsLocation config usage
Ensure we use the `ConfigBag` that we pass into the methods (rather than
`location.config().get(...)`) because the ConfigBag will contain the union of
the location's config along with any overrides/additions that were passed in to
methods like `obtain()` (e.g. via an entity's `provisioning.properties`).
See individual commits for details.
Much longer term, all this config usage is a bit worrying! For an entity,
there is special config lookup so that it correctly handles inherited config
etc. For locations, we don't have runtime-management inheritance (which is a
relief!) so things are a lot simpler. But the big code differences between
Location and Entity are worrying.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/brooklyn-server
fix-JcloudsLocation-config-usage
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/710.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 #710
----
commit a913a0772d5f67be59b6bdf9bc7e0a78beafb40f
Author: Aled Sage <[email protected]>
Date: 2017-05-30T09:57:10Z
Fix JcloudsLocation.registerMachine(ConfigBag)
It now combines the config().getBag() with the config passed in.
commit b75934bf0b1bf8f6284d9df860712e9bfedc49ff
Author: Aled Sage <[email protected]>
Date: 2017-05-30T10:13:17Z
JcloudsLocation: call unmanage after createTemporarySshMachineLocation
commit 1e0ff4b1de75726778785863f2dfcaf464fa8b1e
Author: Aled Sage <[email protected]>
Date: 2017-05-30T10:14:18Z
JcloudsLocation: use merged config for WAIT_WINDOWS_TO_START
Use `setup` (which combines locationâs config and args passed to
obtain(), such as from entityâs `provisioning.properties`).
commit 02f911723c46c5076d2bb810c41efcc8682e8264
Author: Aled Sage <[email protected]>
Date: 2017-05-30T10:16:09Z
JcloudsLocation.createTemporarySshMachineLocation: sshToolClass not special
Just rely on any `sshToolClass` config being passed in the ConfigBag
arg (rather than also looking up jcloudsLocation.config()). The passed
in ConfigBag should be a merger of the locationâs config and any
additional config that has been passed in.
----
---
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.
---