Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/529#discussion_r97610554
--- Diff:
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
---
@@ -2607,24 +2522,32 @@ public boolean apply(@Nullable WinRmMachineLocation
machine) {
return credsSuccessful.get();
}
- protected LoginCredentials waitForSshable(final ComputeService
computeService, final NodeMetadata node, HostAndPort managementHostAndPort,
ConfigBag setup) {
- LoginCredentials nodeCreds = node.getCredentials();
+ protected LoginCredentials waitForSshableGuessCredentials(final
ComputeService computeService, final NodeMetadata node, HostAndPort
managementHostAndPort, ConfigBag setup) {
+ // See https://issues.apache.org/jira/browse/BROOKLYN-186
+ // Handle where jclouds gives us the wrong login user (!) and both
a password + ssh key.
+ // Try all the permutations to find the one that works.
+ Iterable<LoginCredentials> credentialsToTry =
generateCredentials(node.getCredentials(), setup.get(LOGIN_USER));
+ return waitForSshable(computeService, node, managementHostAndPort,
credentialsToTry, setup);
+ }
+
+ /** @deprecated Since 0.11.0. Use {@link
#waitForSshableGuessCredentials} instead. */
+ @Deprecated
+ protected LoginCredentials waitForSshable(ComputeService
computeService, NodeMetadata node, HostAndPort managementHostAndPort, ConfigBag
setup) {
+ return waitForSshable(computeService, node, managementHostAndPort,
setup);
--- End diff --
Good spot.
---
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.
---