Github user neykov commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/732#issuecomment-118329892
After discussion:
The problem is that `addShard` and `--configdb` are supposed to have the
same values, matching textually. Can't have hostname at one place, IP at the
other. Atm `--configdb` uses
`getAttribute(MongoDBConfigServer.SUBNET_HOSTNAME)`, while `addShard` uses the
public `MONGO_SERVER_ENDPOINT` initialized with
`BrooklynAccessUtils.getBrooklynAccessibleAddress`. The solution would be to
use `addShard` with `SUBNET_HOSTNAME` as well. Shouldn't matter for cloud
machines (where the values match), but for localhost they are different.
Optional improvements:
* update documentation of `MONGO_SERVER_ENDPOINT` and
`HTTP_INTERFACE_URL` to indicate that they are public IPs (better not be used
for local connections)
* Implement `HasSubnetHostname` for
`LocalhostMachineProvisioningLocation` returning `localhost`, so that
`Machines.getSubnetHostname` doesn't return `127.0.0.1` (for consistence).
---
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.
---