Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/832#discussion_r37280041
--- Diff:
software/database/src/main/java/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
---
@@ -307,6 +327,17 @@ public void customize() {
// on port 5432?" error then the port is probably closed. Check
that the firewall allows external TCP/IP
// connections (netstat -nap). You can open a port with lokkit or
by configuring the iptables.
}
+
+ protected String getUserPassword() {
+ String password = entity.getConfig(PostgreSqlNode.PASSWORD);
+ if (Strings.isEmpty(password)) {
+ log.debug(entity + " has no password specified for " +
PostgreSqlNode.PASSWORD + "; using a random string");
+ password = brooklyn.util.text.Strings.makeRandomId(8);
+ entity.setAttribute(PostgreSqlNode.PASSWORD, password);
--- End diff --
Why set the attribute too? It would be quite confusing to
`setAttribute(password)` but have it overwritten when `getUserPassword` is
called. Perhaps `USERNAME` and `PASSWORD` are just `ConfigKeys` that are set
for you if not given?
---
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.
---