Problem with late initialization of SSH Keys in ClusterSpec
-----------------------------------------------------------
Key: WHIRR-581
URL: https://issues.apache.org/jira/browse/WHIRR-581
Project: Whirr
Issue Type: Bug
Reporter: Giulio Cesare Solaroli
Priority: Minor
When invoking ClusterSpec constructor without any parameters, a verification on
the default SSH private key [1] is executed [2] before the option to set the
right value using the "setPrivateKey" setter [3].
If the user running whirr does not have an SSH key at the expected default
path, the initialization will fail.
# Workaround
At the moment it is possible to avoid this problem creating an initial
properties object to override the private key path; something like this:
defaultPropertiesFix = new PropertiesConfiguration();
defaultPropertiesFix.setProperty(ClusterSpec.Property.PUBLIC_KEY_FILE.getConfigName(),
"${sys:user.home}/.ssh/id_whirr.pub");
defaultPropertiesFix.setProperty(ClusterSpec.Property.PRIVATE_KEY_FILE.getConfigName(),
"${sys:user.home}/.ssh/id_whirr");
clusterSpecifications = new ClusterSpec(defaultPropertiesFix);
[1]: whirr.private-key-file=${sys:user.home}/.ssh/id_rsa
[2]: org.apache.whirr.ClusterSpec.java#328
[3]: org.apache.whirr.ClusterSpec.java#766 and #777
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira