make ssh port in alluxio.cli.validation.SshValidationTask configurable

Description

  • When doing validateEnv command for a cluster, there will be a "Validating ssh.masters.reachable" and "Validating ssh.workers.reachable" stage which will check if the master can successfully ssh to the specify worker host

  • the method is "alluxio.cli.validation.SshValidationTask" which will hardcode the ssh port to 22

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 public final class SshValidationTask extends AbstractValidationTask { private final String mFileName; /** * Creates a new instance of {@link SshValidationTask}. * * @param fileName file name for a node list file (e.g. conf/workers, conf/masters) */ public SshValidationTask(String fileName) { mFileName = fileName; } @Override public TaskResult validate(Map<String, String> optionsMap) { List<String> nodes = Utils.readNodeList(mFileName); if (nodes == null) { return TaskResult.FAILED; } boolean hasUnreachableNodes = false; for (String nodeName : nodes) { if (!Utils.isAddressReachable(nodeName, 22)) { System.err.format("Unable to reach ssh port 22 on node %s.%n", nodeName); hasUnreachableNodes = true; } } return hasUnreachableNodes ? TaskResult.WARNING : TaskResult.OK; } }
  • in typical Enterprise environment,for the sake of security, the default ssh port of 22 will usually change to a non-typical port

  • IMO, it is reasonable to have a configuration for the ssh port with a default value of 22

Environment

alluxio version: 1.8.1
os version: debian 8.9
hadoop version: cdh5.6.0-hadoop2.6.0

Status

Assignee

Calvin Jia

Reporter

Shuang Li (louShang)

Labels

None

Components

Affects versions

1.8.1

Priority

Minor
Configure