Github user aledsage commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/301#issuecomment-61815161
For localhost, there is a static mutex (hence the problems here). If one is
deploying to different machines, it's fine.
For `SameServerEntity`, then yes - it's a risk. The problem happens if the
`getEnvironmentVariables()` method of one entity contains config that is an
`attributeWhenReady` pointing at the other entity. This includes If the
`install` command retrieves the Java system properties.
The solution when implementing an entity is to use
`environmentVariablesReset()` when building the install command, to tell it not
to retrieve the `driver.getEnvironmentVariables()` values.
Certainly not ideal as it's very subtle and thus unexpected! Better would
be to be more explicit about the environment variables to use for each command.
Merging this PR now.
---
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.
---