SSH session may be broken or closed during the operation
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 466
- Forks
- 338
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 8
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
- What did you do?
We store SSH sessions for hosts in context and reuse them for every SSH operations, but it is possible for the session to be closed or somehow broken before we finish all commands.
There is a cased that when ControlMaster and ControlPath is set in the SSH config of console server, random timeout error might be observed during operations like start for the cluster, while filtering only some roles / nodes avoids that error.
It's possible that when there are more instances than some number, the SSH session is used too late after it was created, and at that time it is already closed or stalled.
-
What did you expect to see?
We should find a better way handling SSH sessions, maybe send keepalive packets? -
What did you see instead?
Some operations got random timeout error on large cluster. -
What version of TiUP are you using (
tiup --version)?
v1.0.8, and should be valid on v1.1.0 too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the SSH session reuse used by cluster start operations and reproduce the timeout on a large cluster with ControlMaster and ControlPath configured. The issue names no files or tests, so first map the relevant entry points and existing session handling. Done means large-cluster operations no longer fail randomly when a reused session is closed or stalled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100