Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clus.sh init fails at running ssh-copy-id command under slow ssh session #4

Open
tatsuya6502 opened this issue Mar 22, 2015 · 0 comments

Comments

@tatsuya6502
Copy link
Member

The init command in clus.sh uses expect command when it runs ssh-copy-id command.

    { eval "$EXPECT -c 'spawn $SSHCOPYID $NODE_USER@$NODE_HOST' -c 'expect password:' -c 'send $passwd\n' -c 'expect eof' &> $NULLFILE"; } || \
        die "remote user '$NODE_USER@$NODE_HOST' ssh-copy-id failed"

There seems two problems with this implementation:

  1. The default timeout for expect seems too short, so if ssh session is slow (e.g. sshd can't resolve ssh client's host name -- UseDNS yes), expect will fire send $passwd\n before establishing the session. This causes ssh-copy-id command to fail.
  2. When the timeout occurs, die ... part won't detect the error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant